class MCExpr
Declaration
class MCExpr { /* full declaration omitted */ };
Description
Base class for the full range of assembler expressions which are needed for parsing.
Declared at: llvm/include/llvm/MC/MCExpr.h:35
Method Overview
- protected MCExpr(llvm::MCExpr::ExprKind Kind, llvm::SMLoc Loc)
- public MCExpr(const llvm::MCExpr &)
- public void dump() const
- public bool evaluateAsAbsolute(int64_t & Res, const llvm::MCAsmLayout & Layout, const llvm::SectionAddrMap & Addrs) const
- public bool evaluateAsAbsolute(int64_t & Res) const
- public bool evaluateAsAbsolute(int64_t & Res, const llvm::MCAssembler & Asm) const
- public bool evaluateAsAbsolute(int64_t & Res, const llvm::MCAssembler * Asm) const
- public bool evaluateAsAbsolute(int64_t & Res, const llvm::MCAsmLayout & Layout) const
- public bool evaluateAsRelocatable(llvm::MCValue & Res, const llvm::MCAsmLayout * Layout, const llvm::MCFixup * Fixup) const
- protected bool evaluateAsRelocatableImpl(llvm::MCValue & Res, const llvm::MCAssembler * Asm, const llvm::MCAsmLayout * Layout, const llvm::MCFixup * Fixup, const llvm::SectionAddrMap * Addrs, bool InSet) const
- public bool evaluateAsValue(llvm::MCValue & Res, const llvm::MCAsmLayout & Layout) const
- public bool evaluateKnownAbsolute(int64_t & Res, const llvm::MCAsmLayout & Layout) const
- public llvm::MCFragment * findAssociatedFragment() const
- public llvm::MCExpr::ExprKind getKind() const
- public llvm::SMLoc getLoc() const
- public void print(llvm::raw_ostream & OS, const llvm::MCAsmInfo * MAI, bool InParens = false) const
Methods
¶MCExpr(llvm::MCExpr::ExprKind Kind,
llvm::SMLoc Loc)
MCExpr(llvm::MCExpr::ExprKind Kind,
llvm::SMLoc Loc)
Declared at: llvm/include/llvm/MC/MCExpr.h:54
Parameters
- llvm::MCExpr::ExprKind Kind
- llvm::SMLoc Loc
¶MCExpr(const llvm::MCExpr&)
MCExpr(const llvm::MCExpr&)
Declared at: llvm/include/llvm/MC/MCExpr.h:62
Parameters
- const llvm::MCExpr&
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/MC/MCExpr.h:77
¶bool evaluateAsAbsolute(
int64_t& Res,
const llvm::MCAsmLayout& Layout,
const llvm::SectionAddrMap& Addrs) const
bool evaluateAsAbsolute(
int64_t& Res,
const llvm::MCAsmLayout& Layout,
const llvm::SectionAddrMap& Addrs) const
Description
Try to evaluate the expression to an absolute value.
Declared at: llvm/include/llvm/MC/MCExpr.h:90
Parameters
- int64_t& Res
- - The absolute value, if evaluation succeeds.
- const llvm::MCAsmLayout& Layout
- - The assembler layout object to use for evaluating symbol values. If not given, then only non-symbolic expressions will be evaluated.
- const llvm::SectionAddrMap& Addrs
Returns
- True on success.
¶bool evaluateAsAbsolute(int64_t& Res) const
bool evaluateAsAbsolute(int64_t& Res) const
Declared at: llvm/include/llvm/MC/MCExpr.h:92
Parameters
- int64_t& Res
¶bool evaluateAsAbsolute(
int64_t& Res,
const llvm::MCAssembler& Asm) const
bool evaluateAsAbsolute(
int64_t& Res,
const llvm::MCAssembler& Asm) const
Declared at: llvm/include/llvm/MC/MCExpr.h:93
Parameters
- int64_t& Res
- const llvm::MCAssembler& Asm
¶bool evaluateAsAbsolute(
int64_t& Res,
const llvm::MCAssembler* Asm) const
bool evaluateAsAbsolute(
int64_t& Res,
const llvm::MCAssembler* Asm) const
Declared at: llvm/include/llvm/MC/MCExpr.h:94
Parameters
- int64_t& Res
- const llvm::MCAssembler* Asm
¶bool evaluateAsAbsolute(
int64_t& Res,
const llvm::MCAsmLayout& Layout) const
bool evaluateAsAbsolute(
int64_t& Res,
const llvm::MCAsmLayout& Layout) const
Declared at: llvm/include/llvm/MC/MCExpr.h:95
Parameters
- int64_t& Res
- const llvm::MCAsmLayout& Layout
¶bool evaluateAsRelocatable(
llvm::MCValue& Res,
const llvm::MCAsmLayout* Layout,
const llvm::MCFixup* Fixup) const
bool evaluateAsRelocatable(
llvm::MCValue& Res,
const llvm::MCAsmLayout* Layout,
const llvm::MCFixup* Fixup) const
Description
Try to evaluate the expression to a relocatable value, i.e. an expression of the fixed form (a - b + constant).
Declared at: llvm/include/llvm/MC/MCExpr.h:106
Parameters
- llvm::MCValue& Res
- - The relocatable value, if evaluation succeeds.
- const llvm::MCAsmLayout* Layout
- - The assembler layout object to use for evaluating values.
- const llvm::MCFixup* Fixup
- - The Fixup object if available.
Returns
- True on success.
¶bool evaluateAsRelocatableImpl(
llvm::MCValue& Res,
const llvm::MCAssembler* Asm,
const llvm::MCAsmLayout* Layout,
const llvm::MCFixup* Fixup,
const llvm::SectionAddrMap* Addrs,
bool InSet) const
bool evaluateAsRelocatableImpl(
llvm::MCValue& Res,
const llvm::MCAssembler* Asm,
const llvm::MCAsmLayout* Layout,
const llvm::MCFixup* Fixup,
const llvm::SectionAddrMap* Addrs,
bool InSet) const
Declared at: llvm/include/llvm/MC/MCExpr.h:56
Parameters
- llvm::MCValue& Res
- const llvm::MCAssembler* Asm
- const llvm::MCAsmLayout* Layout
- const llvm::MCFixup* Fixup
- const llvm::SectionAddrMap* Addrs
- bool InSet
¶bool evaluateAsValue(
llvm::MCValue& Res,
const llvm::MCAsmLayout& Layout) const
bool evaluateAsValue(
llvm::MCValue& Res,
const llvm::MCAsmLayout& Layout) const
Description
Try to evaluate the expression to the form (a - b + constant) where neither a nor b are variables. This is a more aggressive variant of evaluateAsRelocatable. The intended use is for when relocations are not available, like the .size directive.
Declared at: llvm/include/llvm/MC/MCExpr.h:114
Parameters
- llvm::MCValue& Res
- const llvm::MCAsmLayout& Layout
¶bool evaluateKnownAbsolute(
int64_t& Res,
const llvm::MCAsmLayout& Layout) const
bool evaluateKnownAbsolute(
int64_t& Res,
const llvm::MCAsmLayout& Layout) const
Declared at: llvm/include/llvm/MC/MCExpr.h:97
Parameters
- int64_t& Res
- const llvm::MCAsmLayout& Layout
¶llvm::MCFragment* findAssociatedFragment() const
llvm::MCFragment* findAssociatedFragment() const
Description
Find the "associated section" for this expression, which is currently defined as the absolute section for constants, or otherwise the section associated with the first defined symbol in the expression.
Declared at: llvm/include/llvm/MC/MCExpr.h:120
¶llvm::MCExpr::ExprKind getKind() const
llvm::MCExpr::ExprKind getKind() const
Description
@ {
Declared at: llvm/include/llvm/MC/MCExpr.h:68
¶llvm::SMLoc getLoc() const
llvm::SMLoc getLoc() const
Declared at: llvm/include/llvm/MC/MCExpr.h:69
¶void print(llvm::raw_ostream& OS,
const llvm::MCAsmInfo* MAI,
bool InParens = false) const
void print(llvm::raw_ostream& OS,
const llvm::MCAsmInfo* MAI,
bool InParens = false) const
Description
@ } @ {
Declared at: llvm/include/llvm/MC/MCExpr.h:75
Parameters
- llvm::raw_ostream& OS
- const llvm::MCAsmInfo* MAI
- bool InParens = false