15#ifndef LLVM_OPTION_LIBRARYOPTIONS_H
16#define LLVM_OPTION_LIBRARYOPTIONS_H
35 return static_cast<T *
>(Opts)->apply(
A,
Alloc);
38 return new (
Alloc)
T(T::Default);
42 function_ref<
void(StringRef, StringRef, StringRef)> Fn)
const override;
43 Error
parse(
void *Opts, ArrayRef<const char *> Args,
unsigned &Consumed,
44 BumpPtrAllocator &Alloc)
const override;
45 const void *
getDefault()
const override {
return Default; }
61 static_assert(std::is_trivially_destructible_v<T>,
62 "an options struct must not need an exit-time destructor");
77#define LLVM_REGISTER_LIBRARY_OPTIONS(T) \
78 _Pragma("clang diagnostic push") \
79 _Pragma("clang diagnostic ignored \"-Wglobal-constructors\"") \
80 static llvm::opt::RegisterLibraryOptions<T> Registration; \
81 _Pragma("clang diagnostic pop")
83#define LLVM_REGISTER_LIBRARY_OPTIONS(T) \
84 static llvm::opt::RegisterLibraryOptions<T> Registration;
This file defines the BumpPtrAllocator interface.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static COFFOptTable optTable
static llvm::Error parse(GsymDataExtractor &Data, uint64_t BaseAddr, LineEntryCallback const &Callback)
The options of a library that declares them in TableGen rather than as cl::opt (see llvm/Option/Libra...
A concrete instance of a particular driver option.
Connects options struct T to cl::parseCommandLineOptions and cl::LibraryOptionsContext.
const void * getDefault() const override
Returns the default values.
constexpr LibraryOptionsParser(std::in_place_type_t< T >)
void * copyDefault(BumpPtrAllocator &Alloc) const override
Returns a copy of getDefault() allocated from Alloc.
The option table of an options struct.
LLVM_ABI void addLibraryOptions(const LibraryOptions &L)
Makes ParseCommandLineOptions recognize L's options.
This is an optimization pass for GlobalISel generic memory operations.
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.