28 "--show-symbol-table",
29 "--show-function-table",
34 "--string-abstraction",
48 "--validate-goto-model",
49 "--export-file-local-symbols",
57 for(std::size_t i = 0; i < arguments.size(); i++)
60 if(std::string(arguments[i], 0, 2) ==
"--")
65 arguments[i] ==
"--verbosity" || arguments[i] ==
"--function" ||
66 arguments[i] ==
"--mangle-suffix")
68 if(i < arguments.size() - 1)
70 set(arguments[i], arguments[i + 1]);
75 else if(!arguments[i].empty() && arguments[i][0] ==
'@')
80 else if(arguments[i] ==
"/link" || arguments[i] ==
"-link")
83 i = arguments.size() - 1;
86 arguments[i].size() == 2 &&
87 (arguments[i] ==
"/D" || arguments[i] ==
"-D") &&
88 i != arguments.size() - 1)
91 std::string tmp =
"/D" + arguments[i + 1];
109 const wchar_t *CL_env=_wgetenv(L
"CL");
116 const char *CL_env=getenv(
"CL");
131 std::vector<std::string> arguments;
134 for(
int i=1; i<argc; i++)
135 arguments.push_back(argv[i]);
137 return parse(arguments);
140 static std::istream &
my_wgetline(std::istream &in, std::wstring &dest)
169 dest+=wchar_t(ch1+(ch2<<8));
178 std::ifstream infile(
file);
182 std::cerr <<
"failed to open response file '" <<
file <<
"'\n";
188 getline(infile, line);
190 line[0]==
static_cast<char>(0xff) &&
191 line[1]==
static_cast<char>(0xfe))
210 while(std::getline(infile2, wline))
215 else if(line.size()>=3 &&
216 line[0]==
static_cast<char>(0xef) &&
217 line[1]==
static_cast<char>(0xbb) &&
218 line[2]==
static_cast<char>(0xbf))
224 while(getline(infile, line))
231 while(getline(infile, line))
249 std::vector<std::string> arguments;
251 bool in_quotes=
false;
252 for(std::size_t i=0; i<line.size(); i++)
256 if(ch==
' ' && !in_quotes)
259 arguments.push_back(option);
264 in_quotes=!in_quotes;
271 arguments.push_back(option);
278 const std::string &s)
287 std::cout <<
"Warning: uninterpreted non-CL option '" << s <<
"'\n";
423 if(s[0]!=
'/' && s[0]!=
'-')
431 if(std::string(s, 1, std::string::npos)==
ms_cl_flags[j])
446 option.
optstring=std::string(s, 1, std::string::npos);
451 if(!optnr.has_value())
466 if(std::string(s, 1, ms_cl_prefix.size())==ms_cl_prefix)
472 if(ms_cl_prefix.size()==1)
476 option.
optchar=ms_cl_prefix[0];
487 if(!optnr.has_value())
494 options[*optnr].values.push_back(
495 std::string(s, ms_cl_prefix.size()+1, std::string::npos));
502 std::cout <<
"Warning: uninterpreted CL option '" << s <<
"'\n";