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, EmitCompactUnwindNonCanonical)
43MCOPT(
bool, ShowMCInst)
44MCOPT(
bool, FatalWarnings)
46MCOPT(
bool, NoDeprecatedWarn)
47MCOPT(
bool, NoTypeCheck)
48MCOPT(std::string, ABIName)
49MCOPT(std::string, AsSecureLogFile)
52#define MCBINDOPT(NAME) \
54 NAME##View = std::addressof(NAME); \
58 "mc-relax-all",
cl::desc(
"When used with filetype=obj, relax all fixups "
59 "in the emitted object file"));
63 "incremental-linker-compatible",
65 "When used with filetype=obj, "
66 "emit an object file which can be used with an incremental linker"));
75 cl::desc(
"Generate debugging info in the 64-bit DWARF format"));
79 "emit-dwarf-unwind",
cl::desc(
"Whether to emit DWARF EH frame entries."),
80 cl::init(EmitDwarfUnwindType::Default),
82 "Always emit EH frame entries"),
83 clEnumValN(EmitDwarfUnwindType::NoCompactUnwind,
85 "Only emit EH frame entries when compact unwind is "
87 clEnumValN(EmitDwarfUnwindType::Default,
"default",
88 "Use target platform default")));
92 "emit-compact-unwind-non-canonical",
94 "Whether to try to emit Compact Unwind for non canonical entries."),
101 cl::desc(
"Emit internal instruction representation to assembly file"));
105 cl::desc(
"Treat warnings as errors"));
114 "no-deprecated-warn",
cl::desc(
"Suppress all deprecated warnings"));
118 "no-type-check",
cl::desc(
"Suppress type errors (Wasm)"));
123 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 getEmitCompactUnwindNonCanonical()
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.