LLVM 22.0.0git
MCTargetOptionsCommandFlags.cpp File Reference

Go to the source code of this file.

Macros

#define MCOPT(TY, NAME)
#define MCOPT_EXP(TY, NAME)
#define MCBINDOPT(NAME)

Macro Definition Documentation

◆ MCBINDOPT

#define MCBINDOPT ( NAME)
Value:
do { \
NAME##View = std::addressof(NAME); \
} while (0)

Referenced by llvm::mc::RegisterMCTargetOptionsFlags::RegisterMCTargetOptionsFlags().

◆ MCOPT

#define MCOPT ( TY,
NAME )
Value:
static cl::opt<TY> *NAME##View; \
TY llvm::mc::get##NAME() { \
assert(NAME##View && "RegisterMCTargetOptionsFlags not created."); \
return *NAME##View; \
}

Definition at line 20 of file MCTargetOptionsCommandFlags.cpp.

◆ MCOPT_EXP

#define MCOPT_EXP ( TY,
NAME )
Value:
MCOPT(TY, NAME) \
std::optional<TY> llvm::mc::getExplicit##NAME() { \
if (NAME##View->getNumOccurrences()) { \
TY res = *NAME##View; \
return res; \
} \
return std::nullopt; \
}
#define MCOPT(TY, NAME)

Definition at line 27 of file MCTargetOptionsCommandFlags.cpp.