|
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> | |
| constexpr | 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) const override |
Parses the option spelled by Args[0], which may take Args[1] as its value, into Opts and sets Consumed to the number of arguments it spans. | |
| const void * | getDefault () const override |
| Returns the default values. | |
| void * | copyDefault (BumpPtrAllocator &Alloc) const override |
Returns a copy of getDefault() allocated from Alloc. | |
| 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 | |
| constexpr | LibraryOptions ()=default |
| ~LibraryOptions ()=default | |
Connects options struct T to cl::parseCommandLineOptions and cl::LibraryOptionsContext.
Definition at line 124 of file LibraryOptions.h.
|
inlineexplicitconstexpr |
Definition at line 127 of file LibraryOptions.h.
References A(), llvm::Alloc, const, optTable, and T.
|
inlineoverridevirtual |
Returns a copy of getDefault() allocated from Alloc.
Implements llvm::cl::LibraryOptions.
Definition at line 141 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 140 of file LibraryOptions.h.
|
overridevirtual |
Parses the option spelled by Args[0], which may take Args[1] as its value, into Opts 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.