15#ifndef LLVM_OPTION_LIBRARYOPTIONS_H
16#define LLVM_OPTION_LIBRARYOPTIONS_H
36 if (S ==
"true" || S ==
"1")
38 else if (S ==
"false" || S ==
"0")
59std::enable_if_t<std::is_arithmetic_v<T> && !std::is_same_v<T, bool>,
bool>
61 if constexpr (std::is_floating_point_v<T>)
83template <
typename T,
typename F>
90template <
typename T,
typename F>
93 static_assert(std::is_trivially_copyable_v<T>);
97 if (!ParseElem(Item, Elem))
127 : Table(Table), Apply(Apply), Reset(Reset) {}
145 static_assert(std::is_trivially_destructible_v<T>,
146 "an options struct must not need an exit-time destructor");
149 return T::Global.apply(
A,
Alloc);
151 [] { T::Global =
T(); }};
This file defines the BumpPtrAllocator interface.
Defines the llvm::Arg class for parsed arguments.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static llvm::Error parse(GsymDataExtractor &Data, uint64_t BaseAddr, LineEntryCallback const &Callback)
This file defines the SmallVector class.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
The options of a library that declares them in TableGen rather than as cl::opt (see llvm/Option/Libra...
An efficient, type-erasing, non-owning reference to a callable.
A concrete instance of a particular driver option.
LibraryOptTable(const Tables &T)
~LibraryOptTable() override
Connects an options struct to cl::ParseCommandLineOptions.
LibraryOptionsParser(TableFn Table, ApplyFn Apply, void(*Reset)())
const OptTable &(*)() TableFn
void reset() override
Restores the default values.
bool(*)(const Arg &, BumpPtrAllocator &) ApplyFn
Provide access to the Option info table.
OptTable(const Tables &Tables, bool IgnoreCase=false)
LLVM_ABI void addLibraryOptions(LibraryOptions &L)
Makes ParseCommandLineOptions recognize L's options.
bool parseArgValue(StringRef S, bool &V)
This is an optimization pass for GlobalISel generic memory operations.
bool to_float(const Twine &T, float &Num)
iterator_range< SplittingIterator > split(StringRef Str, StringRef Separator)
Split the specified string over a separator and return a range-compatible iterable over its partition...
ArrayRef(const T &OneElt) -> ArrayRef< T >
OutputIt copy(R &&Range, OutputIt Out)
bool to_integer(StringRef S, N &Num, unsigned Base=0)
Convert the string S to an integer of the specified type using the radix Base. If Base is 0,...
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
The tables TableGen emits for an option set under OPTTABLE_CODE.