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 MCOPT_EXP(TY, NAME) \
29 std::optional<TY> llvm::mc::getExplicit##NAME() { \
30 if (NAME##View->getNumOccurrences()) { \
31 TY res = *NAME##View; \
34 return std::nullopt; \
38MCOPT(
bool, IncrementalLinkerCompatible)
39MCOPT(
int, DwarfVersion)
42MCOPT(
bool, ShowMCInst)
43MCOPT(
bool, FatalWarnings)
45MCOPT(
bool, NoDeprecatedWarn)
46MCOPT(
bool, NoTypeCheck)
47MCOPT(std::string, ABIName)
48MCOPT(std::string, AsSecureLogFile)
51#define MCBINDOPT(NAME) \
53 NAME##View = std::addressof(NAME); \
57 "mc-relax-all",
cl::desc(
"When used with filetype=obj, relax all fixups "
58 "in the emitted object file"));
62 "incremental-linker-compatible",
64 "When used with filetype=obj, "
65 "emit an object file which can be used with an incremental linker"));
74 cl::desc(
"Generate debugging info in the 64-bit DWARF format"));
78 "emit-dwarf-unwind",
cl::desc(
"Whether to emit DWARF EH frame entries."),
79 cl::init(EmitDwarfUnwindType::Default),
81 "Always emit EH frame entries"),
82 clEnumValN(EmitDwarfUnwindType::NoCompactUnwind,
84 "Only emit EH frame entries when compact unwind is "
86 clEnumValN(EmitDwarfUnwindType::Default,
"default",
87 "Use target platform default")));
92 cl::desc(
"Emit internal instruction representation to assembly file"));
96 cl::desc(
"Treat warnings as errors"));
105 "no-deprecated-warn",
cl::desc(
"Suppress all deprecated warnings"));
109 "no-type-check",
cl::desc(
"Suppress type errors (Wasm)"));
114 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)
bool getIncrementalLinkerCompatible()
std::string getAsSecureLogFile()
MCTargetOptions InitMCTargetOptionsFromFlags()
bool getNoDeprecatedWarn()
EmitDwarfUnwindType getEmitDwarfUnwind()
This is an optimization pass for GlobalISel generic memory operations.
Create this object with static storage to register mc-related command line options.