20#define MCOPT(TY, NAME) \
21 static cl::opt<TY> *NAME##View; \
22 TY llvm::mc::get##NAME() { \
23 assert(NAME##View && "RegisterMCTargetOptionsFlags not created."); \
27#define MCSTROPT(NAME) \
28 static cl::opt<std::string> *NAME##View; \
29 StringRef llvm::mc::get##NAME() { \
30 assert(NAME##View && "RegisterMCTargetOptionsFlags not created."); \
34#define MCOPT_EXP(TY, NAME) \
36 std::optional<TY> llvm::mc::getExplicit##NAME() { \
37 if (NAME##View->getNumOccurrences()) { \
38 TY res = *NAME##View; \
41 return std::nullopt; \
45MCOPT(
bool, IncrementalLinkerCompatible)
47MCOPT(
int, DwarfVersion)
50MCOPT(
bool, EmitCompactUnwindNonCanonical)
51MCOPT(
bool, EmitSFrameUnwind)
52MCOPT(
bool, ShowMCInst)
53MCOPT(
bool, FatalWarnings)
55MCOPT(
bool, NoDeprecatedWarn)
56MCOPT(
bool, NoTypeCheck)
57MCOPT(
bool, SaveTempLabels)
59MCOPT(
bool, ImplicitMapSyms)
60MCOPT(
bool, X86RelaxRelocations)
61MCOPT(
bool, X86Sse2Avx)
67#define MCBINDOPT(NAME) \
69 NAME##View = std::addressof(NAME); \
73 "mc-relax-all",
cl::desc(
"When used with filetype=obj, relax all fixups "
74 "in the emitted object file"));
78 "incremental-linker-compatible",
80 "When used with filetype=obj, "
81 "emit an object file which can be used with an incremental linker"));
93 cl::desc(
"Generate debugging info in the 64-bit DWARF format"));
97 "emit-dwarf-unwind",
cl::desc(
"Whether to emit DWARF EH frame entries."),
100 "Always emit EH frame entries"),
103 "Only emit EH frame entries when compact unwind is "
106 "Use target platform default")));
110 "emit-compact-unwind-non-canonical",
112 "Whether to try to emit Compact Unwind for non canonical entries."),
115 MCBINDOPT(EmitCompactUnwindNonCanonical);
118 "gsframe",
cl::desc(
"Whether to emit .sframe unwind sections."),
124 cl::desc(
"Emit internal instruction representation to assembly file"));
128 cl::desc(
"Treat warnings as errors"));
137 "no-deprecated-warn",
cl::desc(
"Suppress all deprecated warnings"));
141 "no-type-check",
cl::desc(
"Suppress type errors (Wasm)"));
145 "save-temp-labels",
cl::desc(
"Don't discard temporary labels"));
149 cl::desc(
"Use CREL relocation format for ELF"));
154 cl::desc(
"Allow mapping symbol at section beginning to be implicit, "
155 "lowering number of mapping symbols at the expense of some "
156 "portability. Recommended for projects that can build all their "
157 "object files using this option"));
161 "x86-relax-relocations",
162 cl::desc(
"Emit GOTPCRELX/REX_GOTPCRELX/CODE_4_GOTPCRELX instead of "
163 "GOTPCREL on x86-64 ELF"),
168 "x86-sse2avx",
cl::desc(
"Specify that the assembler should encode SSE "
169 "instructions with VEX prefix"));
174 cl::desc(
"Control section symbol conversion for relocations"),
178 "Use section symbols for all eligible local symbols"),
180 "Only use section symbols for internal local symbols"),
182 "Never use section symbols")));
187 cl::desc(
"The name of the ABI to be targeted from the backend."),
#define clEnumValN(ENUMVAL, FLAGNAME, DESC)
#define MCOPT_EXP(TY, NAME)
ValuesClass values(OptsTy... Options)
Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...
initializer< Ty > init(const Ty &Val)
LLVM_ABI bool getEmitCompactUnwindNonCanonical()
LLVM_ABI bool getDwarf64()
LLVM_ABI bool getEmitSFrameUnwind()
LLVM_ABI bool getX86Sse2Avx()
LLVM_ABI MCTargetOptions InitMCTargetOptionsFromFlags()
LLVM_ABI bool getIncrementalLinkerCompatible()
LLVM_ABI bool getNoDeprecatedWarn()
LLVM_ABI bool getNoTypeCheck()
LLVM_ABI EmitDwarfUnwindType getEmitDwarfUnwind()
LLVM_ABI bool getSaveTempLabels()
LLVM_ABI bool getImplicitMapSyms()
LLVM_ABI bool getFatalWarnings()
LLVM_ABI bool getRelaxAll()
LLVM_ABI bool getX86RelaxRelocations()
LLVM_ABI bool getShowMCInst()
LLVM_ABI StringRef getAsSecureLogFile()
LLVM_ABI RelocSectionSymType getRelocSectionSym()
LLVM_ABI int getDwarfVersion()
LLVM_ABI StringRef getABIName()
LLVM_ABI bool getNoWarn()
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI RegisterMCTargetOptionsFlags()