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"
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()) {}
98 if (Kind == Option::InputClass) {
101 } else if (Kind == Option::UnknownClass) {
104 } else if (Kind != Option::GroupClass) {
112 // Check that everything after the first searchable option is a
113 // regular option class.
115 Option::OptionClass Kind = (Option::OptionClass) getInfo(i + 1).Kind;
116 assert((Kind != Option::InputClass && Kind != Option::UnknownClass &&
117 Kind != Option::GroupClass) &&
156 const Option OptTable::getOption(OptSpecifier Opt) const {
159 return Option(nullptr, nullptr);
161 return Option(&getInfo(id), this);
206 // Search for the first next option which could be a prefix.
211 // prefix it, we iteratively search for the next option which could
219 // Scan for first option which is a proper prefix.
226 Option Opt(Start, this);
233 // See if this option matches.
242 // If we failed to find an option and this arg started with /, then it's
295 const Option O = Opts.getOption(Id);
300 case Option::GroupClass: case Option::InputClass: case Option::UnknownClass:
301 llvm_unreachable("Invalid option with help text.");
303 case Option::MultiArgClass:
317 case Option::FlagClass:
320 case Option::SeparateClass: case Option::JoinedOrSeparateClass:
321 case Option::RemainingArgsClass:
324 case Option::JoinedClass: case Option::CommaJoinedClass:
325 case Option::JoinedAndSeparateClass:
341 // Find the maximum option length.
356 const std::string &Option = OptionHelp[i].first;
357 int Pad = OptionFieldWidth - int(Option.size());
358 OS.indent(InitialPad) << Option;
360 // Break on long option names.
376 // Abuse the help text of the option groups to store the "help group"
379 // FIXME: Split out option groups.
402 // Render help text into a map of group-name to a list of (option, help)
411 // FIXME: Split out option groups.
412 if (getOptionKind(Id) == Option::GroupClass)