25 "--print-rejected-preprocessed-source",
47 "--reduce-memory-overheads",
70 "--listing-lhs-width",
71 "--listing-lhs-width2",
72 "--listing-rhs-width",
73 "--listing-cont-lines",
85 for(
int i=1; i<argc; i++)
87 std::string argv_i=argv[i];
107 *o!=
nullptr && !found;
117 set(argv_i, argv[i+1]);
126 set(os, argv_i.substr(os.size()+1));
141 std::size_t equal_pos=argv_i.find(
'=');
143 std::string a_opts=
"hls";
144 if(argv_i.size()>2 &&
145 equal_pos!=std::string::npos &&
147 a_opts=argv_i.substr(2, equal_pos-2);
148 else if(argv_i.size()>2 &&
149 equal_pos==std::string::npos)
150 a_opts=argv_i.substr(2);
152 for(std::string::const_iterator
157 if(equal_pos==std::string::npos)
158 set(std::string(
"-a")+*it);
160 set(std::string(
"-a")+*it, argv_i.substr(equal_pos+1));
173 *o!=
nullptr && !found;
183 set(argv_i, argv[i+1]);
193 set(os, argv_i.substr(os.size()+1));
200 std::cerr <<
"Warning: uninterpreted as option '" << argv_i
const char * as_options_with_argument[]
const char * goto_as_options_with_argument[]
const char * as_options_without_argument[]
A special command line object for GNU Assembler Author: Michael Tautschnig Date: July 2016.
void set(const std::string &opt, const char *value) override
Set option option to value.
void add_infile_arg(const std::string &arg)
static bool in_list(const char *option, const char **list)
virtual bool parse(int argc, const char **argv, const char *optstring)
Parses a commandline according to a specification given in optstring.
void add_arg(const std::string &arg)
bool has_prefix(const std::string &s, const std::string &prefix)
#define PRECONDITION(CONDITION)