|
LLVM 24.0.0git
|
Connects an options struct to cl::ParseCommandLineOptions. More...
#include "llvm/Option/LibraryOptions.h"
Public Types | |
| using | ApplyFn = bool (*)(const Arg &) |
| using | TableFn = const OptTable &(*)() |
Public Member Functions | |
| LibraryOptionsParser (TableFn Table, ApplyFn Apply, void(*Reset)()) | |
| void | forEachOption (function_ref< void(StringRef, StringRef, StringRef)> Fn) const override |
| Error | parse (ArrayRef< const char * > Args, unsigned &Consumed) override |
Parses the option spelled by Args[0], which may take Args[1] as its value, and sets Consumed to the number of arguments it spans. | |
| void | reset () override |
| Restores the default values. | |
| Public Member Functions inherited from llvm::cl::LibraryOptions | |
| virtual void | forEachOption (function_ref< void(StringRef Spelling, StringRef MetaVar, StringRef Help)> Fn) const =0 |
Calls Fn with the spelling of each option without its prefix (e.g. | |
Additional Inherited Members | |
| Protected Member Functions inherited from llvm::cl::LibraryOptions | |
| ~LibraryOptions ()=default | |
Connects an options struct to cl::ParseCommandLineOptions.
Definition at line 72 of file LibraryOptions.h.
| using llvm::opt::LibraryOptionsParser::ApplyFn = bool (*)(const Arg &) |
Definition at line 74 of file LibraryOptions.h.
| using llvm::opt::LibraryOptionsParser::TableFn = const OptTable &(*)() |
Definition at line 75 of file LibraryOptions.h.
|
inline |
Definition at line 76 of file LibraryOptions.h.
|
override |
Definition at line 20 of file LibraryOptions.cpp.
References llvm::StringRef::empty(), llvm::opt::Option::FlagClass, llvm::opt::Option::JoinedClass, llvm::opt::Option::SeparateClass, T, and llvm::Table.
|
overridevirtual |
Parses the option spelled by Args[0], which may take Args[1] as its value, and sets Consumed to the number of arguments it spans.
The strings in Args remain valid until reset().
Implements llvm::cl::LibraryOptions.
Definition at line 35 of file LibraryOptions.cpp.
References A(), llvm::createStringError(), llvm::List, llvm::Error::success(), llvm::Table, and llvm::opt::Option::UnknownClass.
|
inlineoverridevirtual |
Restores the default values.
Implements llvm::cl::LibraryOptions.
Definition at line 82 of file LibraryOptions.h.