LLVM 19.0.0git
Macros
MCTargetOptionsCommandFlags.cpp File Reference
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/Support/CommandLine.h"

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)

◆ 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.