15#ifndef LLVM_OPTION_LIBRARYOPTIONS_H
16#define LLVM_OPTION_LIBRARYOPTIONS_H
32 if (S ==
"true" || S ==
"1")
34 else if (S ==
"false" || S ==
"0")
47std::enable_if_t<std::is_arithmetic_v<T> && !std::is_same_v<T, bool>,
bool>
49 if constexpr (std::is_floating_point_v<T>)
77 : Table(Table), Apply(Apply), Reset(Reset) {}
82 void reset()
override { Reset(); }
95 [](
const Arg &
A) {
return T::Global.apply(
A); },
96 [] { T::Global =
T(); }};
Defines the llvm::Arg class for parsed arguments.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static llvm::Error parse(GsymDataExtractor &Data, uint64_t BaseAddr, LineEntryCallback const &Callback)
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
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
bool(*)(const Arg &) ApplyFn
void reset() override
Restores the default values.
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)
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,...
The tables TableGen emits for an option set under OPTTABLE_CODE.