class MCValue
Declaration
class MCValue { /* full declaration omitted */ };
Description
This represents an "assembler immediate". In its most general form, this can hold ":Kind:(SymbolA - SymbolB + imm64)". Not all targets supports relocations of this general form, but we need to represent this anyway. In general both SymbolA and SymbolB will also have a modifier analogous to the top-level Kind. Current targets are not expected to make use of both though. The choice comes down to whether relocation modifiers apply to the closest symbol or the whole expression. Note that this class must remain a simple POD value class, because we need it to live in unions etc.
Declared at: llvm/include/llvm/MC/MCValue.h:39
Method Overview
- public MCValue()
- public void dump() const
- public static llvm::MCValue get(const llvm::MCSymbolRefExpr * SymA, const llvm::MCSymbolRefExpr * SymB = nullptr, int64_t Val = 0, uint32_t RefKind = 0)
- public static llvm::MCValue get(int64_t Val)
- public MCSymbolRefExpr::VariantKind getAccessVariant() const
- public int64_t getConstant() const
- public uint32_t getRefKind() const
- public const llvm::MCSymbolRefExpr * getSymA() const
- public const llvm::MCSymbolRefExpr * getSymB() const
- public bool isAbsolute() const
- public void print(llvm::raw_ostream & OS) const
Methods
¶MCValue()
MCValue()
Declared at: llvm/include/llvm/MC/MCValue.h:45
¶void dump() const
void dump() const
Description
Print the value to stderr.
Declared at: llvm/include/llvm/MC/MCValue.h:58
¶static llvm::MCValue get(
const llvm::MCSymbolRefExpr* SymA,
const llvm::MCSymbolRefExpr* SymB = nullptr,
int64_t Val = 0,
uint32_t RefKind = 0)
static llvm::MCValue get(
const llvm::MCSymbolRefExpr* SymA,
const llvm::MCSymbolRefExpr* SymB = nullptr,
int64_t Val = 0,
uint32_t RefKind = 0)
Declared at: llvm/include/llvm/MC/MCValue.h:62
Parameters
- const llvm::MCSymbolRefExpr* SymA
- const llvm::MCSymbolRefExpr* SymB = nullptr
- int64_t Val = 0
- uint32_t RefKind = 0
¶static llvm::MCValue get(int64_t Val)
static llvm::MCValue get(int64_t Val)
Declared at: llvm/include/llvm/MC/MCValue.h:73
Parameters
- int64_t Val
¶MCSymbolRefExpr::VariantKind getAccessVariant()
const
MCSymbolRefExpr::VariantKind getAccessVariant()
const
Declared at: llvm/include/llvm/MC/MCValue.h:60
¶int64_t getConstant() const
int64_t getConstant() const
Declared at: llvm/include/llvm/MC/MCValue.h:46
¶uint32_t getRefKind() const
uint32_t getRefKind() const
Declared at: llvm/include/llvm/MC/MCValue.h:49
¶const llvm::MCSymbolRefExpr* getSymA() const
const llvm::MCSymbolRefExpr* getSymA() const
Declared at: llvm/include/llvm/MC/MCValue.h:47
¶const llvm::MCSymbolRefExpr* getSymB() const
const llvm::MCSymbolRefExpr* getSymB() const
Declared at: llvm/include/llvm/MC/MCValue.h:48
¶bool isAbsolute() const
bool isAbsolute() const
Description
Is this an absolute (as opposed to relocatable) value.
Declared at: llvm/include/llvm/MC/MCValue.h:52
¶void print(llvm::raw_ostream& OS) const
void print(llvm::raw_ostream& OS) const
Description
Print the value to the stream \p OS.
Declared at: llvm/include/llvm/MC/MCValue.h:55