Home | History | Annotate | Download | only in Option

Lines Matching full: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"
72 assert(((A.Kind == Option::JoinedClass) ^ (B.Kind == Option::JoinedClass)) &&
74 return B.Kind == Option::JoinedClass;
78 // Support lower_bound between info and an option name.
85 OptSpecifier::OptSpecifier(const Option *Opt) : ID(Opt->getID()) {}
102 if (Kind == Option::InputClass) {
105 } else if (Kind == Option::UnknownClass) {
108 } else if (Kind != Option::GroupClass) {
116 // Check that everything after the first searchable option is a
117 // regular option class.
119 Option::OptionClass Kind = (Option::OptionClass) getInfo(i + 1).Kind;
120 assert((Kind != Option::InputClass && Kind != Option::UnknownClass &&
121 Kind != Option::GroupClass) &&
160 const Option OptTable::getOption(OptSpecifier Opt) const {
163 return Option(nullptr, nullptr);
165 return Option(&getInfo(id), this);
210 // Search for the first next option which could be a prefix.
215 // prefix it, we iteratively search for the next option which could
223 // Scan for first option which is a proper prefix.
230 Option Opt(Start, this);
237 // See if this option matches.
246 // If we failed to find an option and this arg started with /, then it's
294 const Option O = Opts.getOption(Id);
299 case Option::GroupClass: case Option::InputClass: case Option::UnknownClass:
300 llvm_unreachable("Invalid option with help text.");
302 case Option::MultiArgClass:
303 llvm_unreachable("Cannot print metavar for this kind of option.");
305 case Option::FlagClass:
308 case Option::SeparateClass: case Option::JoinedOrSeparateClass:
309 case Option::RemainingArgsClass:
312 case Option::JoinedClass: case Option::CommaJoinedClass:
313 case Option::JoinedAndSeparateClass:
329 // Find the maximum option length.
344 const std::string &Option = OptionHelp[i].first;
345 int Pad = OptionFieldWidth - int(Option.size());
346 OS.indent(InitialPad) << Option;
348 // Break on long option names.
364 // Abuse the help text of the option groups to store the "help group"
367 // FIXME: Split out option groups.
390 // Render help text into a map of group-name to a list of (option, help)
399 // FIXME: Split out option groups.
400 if (getOptionKind(Id) == Option::GroupClass)