|
LLVM 24.0.0git
|
Connects options struct T to cl::parseCommandLineOptions and cl::LibraryOptionsContext. More...
#include "llvm/Option/LibraryOptions.h"
Public Member Functions | |
| template<typename T> | |
| LibraryOptionsParser (std::in_place_type_t< T >) | |
| void | forEachOption (function_ref< void(StringRef, StringRef, StringRef)> Fn) const override |
| Error | parse (void *Opts, ArrayRef< const char * > Args, unsigned &Consumed, BumpPtrAllocator &Alloc) override |
Parses the option spelled by Args[0], which may take Args[1] as its value, into Opts, which is global() or a context's values, and sets Consumed to the number of arguments it spans. | |
| void * | global () override |
| Returns the values that ParseCommandLineOptions sets. | |
| const void * | getDefault () const override |
| Returns the default values. | |
| void * | copyDefault (BumpPtrAllocator &Alloc) const override |
Returns a copy of getDefault() allocated from Alloc. | |
| 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. | |
| bool | isPerContext () const |
| Whether every reader of the options goes through a context's LibraryOptionsContext, so that they need not be set in global(). | |
Additional Inherited Members | |
| Protected Member Functions inherited from llvm::cl::LibraryOptions | |
| LibraryOptions (bool PerContext=false) | |
| ~LibraryOptions ()=default | |
Connects options struct T to cl::parseCommandLineOptions and cl::LibraryOptionsContext.
Definition at line 124 of file LibraryOptions.h.
|
inlineexplicit |
Definition at line 127 of file LibraryOptions.h.
References A(), llvm::Alloc, const, llvm::cl::LibraryOptions::LibraryOptions(), optTable, and T.
|
inlineoverridevirtual |
Returns a copy of getDefault() allocated from Alloc.
Implements llvm::cl::LibraryOptions.
Definition at line 144 of file LibraryOptions.h.
References llvm::Alloc.
|
override |
Definition at line 20 of file LibraryOptions.cpp.
References llvm::opt::Option::GroupClass, llvm::opt::Option::InputClass, llvm::opt::Option::SeparateOrEqClass, T, llvm::Table, and llvm::opt::Option::UnknownClass.
|
inlineoverridevirtual |
Returns the default values.
Implements llvm::cl::LibraryOptions.
Definition at line 143 of file LibraryOptions.h.
|
inlineoverridevirtual |
Returns the values that ParseCommandLineOptions sets.
Implements llvm::cl::LibraryOptions.
Definition at line 142 of file LibraryOptions.h.
|
overridevirtual |
Parses the option spelled by Args[0], which may take Args[1] as its value, into Opts, which is global() or a context's values, and sets Consumed to the number of arguments it spans.
The strings in Args and the memory from Alloc remain valid as long as Opts is used.
Implements llvm::cl::LibraryOptions.
Definition at line 38 of file LibraryOptions.cpp.
References A(), llvm::Alloc, 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 147 of file LibraryOptions.h.