Home | History | Annotate | Download | only in Option

Lines Matching defs:Option

1 //===--- OptTable.cpp - Option Table Implementation -----------------------===//
10 #include "llvm/Option/OptTable.h"
11 #include "llvm/Option/Arg.h"
12 #include "llvm/Option/ArgList.h"
13 #include "llvm/Option/Option.h"
26 // version should come first; a Flag option should precede a Joined
27 // option, for example.
67 assert(((A.Kind == Option::JoinedClass) ^ (B.Kind == Option::JoinedClass)) &&
69 return B.Kind == Option::JoinedClass;
72 // Support lower_bound between info and an option name.
82 OptSpecifier::OptSpecifier(const Option *Opt) : ID(Opt->getID()) {}
97 if (Kind == Option::InputClass) {
100 } else if (Kind == Option::UnknownClass) {
103 } else if (Kind != Option::GroupClass) {
111 // Check that everything after the first searchable option is a
112 // regular option class.
114 Option::OptionClass Kind = (Option::OptionClass) getInfo(i + 1).Kind;
115 assert((Kind != Option::InputClass && Kind != Option::UnknownClass &&
116 Kind != Option::GroupClass) &&
155 const Option OptTable::getOption(OptSpecifier Opt) const {
158 return Option(0, 0);
160 return Option(&getInfo(id), this);
198 // Search for the first next option which could be a prefix.
203 // prefix it, we iteratively search for the next option which could
211 // Scan for first option which is a proper prefix.
218 Option Opt(Start, this);
225 // See if this option matches.
234 // If we failed to find an option and this arg started with /, then it's
266 assert(TheInputOptionID != 0 && "Invalid input option ID.");
296 const Option O = Opts.getOption(Id);
301 case Option::GroupClass: case Option::InputClass: case Option::UnknownClass:
302 llvm_unreachable("Invalid option with help text.");
304 case Option::MultiArgClass:
305 llvm_unreachable("Cannot print metavar for this kind of option.");
307 case Option::FlagClass:
310 case Option::SeparateClass: case Option::JoinedOrSeparateClass:
313 case Option::JoinedClass: case Option::CommaJoinedClass:
314 case Option::JoinedAndSeparateClass:
330 // Find the maximum option length.
345 const std::string &Option = OptionHelp[i].first;
346 int Pad = OptionFieldWidth - int(Option.size());
347 OS.indent(InitialPad) << Option;
349 // Break on long option names.
365 // Abuse the help text of the option groups to store the "help group"
368 // FIXME: Split out option groups.
391 // Render help text into a map of group-name to a list of (option, help)
400 // FIXME: Split out option groups.
401 if (getOptionKind(Id) == Option::GroupClass)