27 "--show-symbol-table",
28 "--show-function-table",
33 "--string-abstraction",
46 "--validate-goto-model",
47 "--export-file-local-symbols",
55 for(std::size_t i = 0; i < arguments.size(); i++)
58 if(std::string(arguments[i], 0, 2) ==
"--")
63 arguments[i] ==
"--verbosity" || arguments[i] ==
"--function" ||
64 arguments[i] ==
"--mangle-suffix")
66 if(i < arguments.size() - 1)
68 set(arguments[i], arguments[i + 1]);
73 else if(!arguments[i].empty() && arguments[i][0] ==
'@')
78 else if(arguments[i] ==
"/link" || arguments[i] ==
"-link")
81 i = arguments.size() - 1;
84 arguments[i].size() == 2 &&
85 (arguments[i] ==
"/D" || arguments[i] ==
"-D") &&
86 i != arguments.size() - 1)
89 std::string tmp =
"/D" + arguments[i + 1];
107 const wchar_t *CL_env=_wgetenv(L
"CL");
114 const char *CL_env=getenv(
"CL");
129 std::vector<std::string> arguments;
132 for(
int i=1; i<argc; i++)
133 arguments.push_back(argv[i]);
135 return parse(arguments);
138 static std::istream &
my_wgetline(std::istream &in, std::wstring &dest)
167 dest += wchar_t(ch1 + (ch2 << CHAR_BIT));
176 std::ifstream infile(file);
180 std::cerr <<
"failed to open response file '" << file <<
"'\n";
186 getline(infile, line);
188 line[0]==
static_cast<char>(0xff) &&
189 line[1]==
static_cast<char>(0xfe))
208 while(std::getline(infile2, wline))
213 else if(line.size()>=3 &&
214 line[0]==
static_cast<char>(0xef) &&
215 line[1]==
static_cast<char>(0xbb) &&
216 line[2]==
static_cast<char>(0xbf))
222 while(getline(infile, line))
229 while(getline(infile, line))
247 std::vector<std::string> arguments;
249 bool in_quotes=
false;
250 for(std::size_t i=0; i<line.size(); i++)
254 if(ch==
' ' && !in_quotes)
257 arguments.push_back(option);
262 in_quotes=!in_quotes;
269 arguments.push_back(option);
276 const std::string &s)
285 std::cout <<
"Warning: uninterpreted non-CL option '" << s <<
"'\n";
421 if(s[0]!=
'/' && s[0]!=
'-')
429 if(std::string(s, 1, std::string::npos)==
ms_cl_flags[j])
444 option.
optstring=std::string(s, 1, std::string::npos);
449 if(!optnr.has_value())
464 if(std::string(s, 1, ms_cl_prefix.size())==ms_cl_prefix)
470 if(ms_cl_prefix.size()==1)
474 option.
optchar=ms_cl_prefix[0];
485 if(!optnr.has_value())
492 options[*optnr].values.push_back(
493 std::string(s, ms_cl_prefix.size()+1, std::string::npos));
500 std::cout <<
"Warning: uninterpreted CL option '" << s <<
"'\n";