LLVM  8.0.1
Static Public Member Functions | List of all members
llvm::MCConstantExpr Class Reference

#include "llvm/MC/MCExpr.h"

Inheritance diagram for llvm::MCConstantExpr:
Inheritance graph
[legend]
Collaboration diagram for llvm::MCConstantExpr:
Collaboration graph
[legend]

Public Member Functions

Accessors
int64_t getValue () const
 
- Public Member Functions inherited from llvm::MCExpr
 MCExpr (const MCExpr &)=delete
 
MCExproperator= (const MCExpr &)=delete
 
ExprKind getKind () const
 
SMLoc getLoc () const
 
void print (raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const
 
void dump () const
 
bool evaluateAsAbsolute (int64_t &Res, const MCAsmLayout &Layout, const SectionAddrMap &Addrs) const
 Try to evaluate the expression to an absolute value. More...
 
bool evaluateAsAbsolute (int64_t &Res) const
 
bool evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm) const
 
bool evaluateAsAbsolute (int64_t &Res, const MCAssembler *Asm) const
 
bool evaluateAsAbsolute (int64_t &Res, const MCAsmLayout &Layout) const
 
bool evaluateKnownAbsolute (int64_t &Res, const MCAsmLayout &Layout) const
 
bool evaluateAsRelocatable (MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const
 Try to evaluate the expression to a relocatable value, i.e. More...
 
bool evaluateAsValue (MCValue &Res, const MCAsmLayout &Layout) const
 Try to evaluate the expression to the form (a - b + constant) where neither a nor b are variables. More...
 
MCFragmentfindAssociatedFragment () const
 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. More...
 

Static Public Member Functions

static bool classof (const MCExpr *E)
 
Construction
static const MCConstantExprcreate (int64_t Value, MCContext &Ctx)
 

Additional Inherited Members

- Public Types inherited from llvm::MCExpr
enum  ExprKind {
  Binary, Constant, SymbolRef, Unary,
  Target
}
 
- Protected Member Functions inherited from llvm::MCExpr
 MCExpr (ExprKind Kind, SMLoc Loc)
 
bool evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, const MCAsmLayout *Layout, const MCFixup *Fixup, const SectionAddrMap *Addrs, bool InSet) const
 

Detailed Description

Definition at line 136 of file MCExpr.h.

Member Function Documentation

◆ classof()

static bool llvm::MCConstantExpr::classof ( const MCExpr E)
inlinestatic

Definition at line 156 of file MCExpr.h.

References llvm::MCExpr::Constant, and llvm::MCExpr::getKind().

◆ create()

const MCConstantExpr * MCConstantExpr::create ( int64_t  Value,
MCContext Ctx 
)
static

Definition at line 164 of file MCExpr.cpp.

Referenced by llvm::HexagonMCInstrInfo::addConstant(), adjustDuplex(), altMacroString(), llvm::ARCMCInstLower::ARCMCInstLower(), CheckBaseRegAndIndexRegAndScale(), ConvertDoubleToBytes(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::MCWinCOFFStreamer::EmitCOFFImgRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSecRel32(), llvm::MCELFStreamer::EmitCommonSymbol(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), llvm::WebAssemblyAsmPrinter::EmitEndOfAsmFile(), llvm::CodeViewContext::emitFileChecksums(), llvm::MCStreamer::emitFill(), llvm::AsmPrinter::emitFrameAlloc(), llvm::AsmPrinter::emitGlobalGOTEquivs(), llvm::AsmPrinter::EmitGlobalVariable(), EmitHiLo(), llvm::SystemZAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitJumpTableAddrs(), llvm::ARMAsmPrinter::EmitJumpTableTBInst(), llvm::AsmPrinter::EmitLabelPlusOffset(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::AMDGPUTargetELFStreamer::EmitPALMetadata(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::CodeViewContext::encodeDefRange(), llvm::WinException::endFunclet(), llvm::MipsMCCodeEmitter::getBranchTarget21OpValue(), llvm::MipsMCCodeEmitter::getBranchTarget21OpValueMM(), llvm::MipsMCCodeEmitter::getBranchTarget26OpValue(), llvm::MipsMCCodeEmitter::getBranchTarget26OpValueMM(), llvm::MipsMCCodeEmitter::getBranchTargetOpValue(), llvm::MipsMCCodeEmitter::getBranchTargetOpValue1SImm16(), llvm::MipsMCCodeEmitter::getBranchTargetOpValueLsl2MMR6(), llvm::MipsMCCodeEmitter::getBranchTargetOpValueMMR6(), llvm::MipsTargetObjectFile::getDebugThreadLocalSymbol(), llvm::SystemZMCInstLower::getExpr(), llvm::X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::X86_64MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), getRealVLDOpcode(), getSpecialRegForName(), GetSymbolRef(), llvm::X86_64MachoTargetObjectFile::getTTypeGlobalReference(), getVariantKind(), HasSecRelSymbolRef(), llvm::HexagonLowerToMC(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::HexagonAsmPrinter::HexagonProcessInstruction(), llvm::XCoreMCInstLower::Initialize(), llvm::MipsMCInstLower::Initialize(), isMatchingOrAlias(), isPCRel(), isShiftedUIntAtAnyPosition(), IsSmallMemAccess(), lowerAddrSpaceCast(), llvm::AsmPrinter::lowerConstant(), lowerSymbolOperand(), llvm::AVRMCInstLower::lowerSymbolOperand(), llvm::MSP430MCInstLower::LowerSymbolOperand(), llvm::LanaiMCInstLower::LowerSymbolOperand(), llvm::AArch64MCInstLower::lowerSymbolOperandCOFF(), llvm::AArch64MCInstLower::lowerSymbolOperandDarwin(), llvm::AArch64MCInstLower::lowerSymbolOperandELF(), makeCombineInst(), MaybePredicatedInst(), PrintQuotedString(), RefineErrorLoc(), ScaleVectorOffset(), setRequiredFeatureString(), llvm::MCContext::setSymbolValue(), shouldBeSls(), llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand(), and llvm::MCExternalSymbolizer::tryAddingSymbolicOperand().

◆ getValue()

int64_t llvm::MCConstantExpr::getValue ( ) const
inline

The documentation for this class was generated from the following files: