LLVM  7.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::Nios2MCExpr Class Reference

#include "Target/Nios2/MCTargetDesc/Nios2MCExpr.h"

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

Public Types

enum  Nios2ExprKind { CEK_None, CEK_ABS_HI, CEK_ABS_LO, CEK_Special }
 
- Public Types inherited from llvm::MCExpr
enum  ExprKind {
  Binary, Constant, SymbolRef, Unary,
  Target
}
 

Public Member Functions

Nios2ExprKind getKind () const
 Get the kind of this expression. More...
 
const MCExprgetSubExpr () const
 Get the child of this expression. More...
 
void printImpl (raw_ostream &OS, const MCAsmInfo *MAI) const override
 
bool evaluateAsRelocatableImpl (MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override
 
void visitUsedExpr (MCStreamer &Streamer) const override
 
MCFragmentfindAssociatedFragment () const override
 
void fixELFSymbolsInTLSFixups (MCAssembler &Asm) const override
 
- 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 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 const Nios2MCExprcreate (Nios2ExprKind Kind, const MCExpr *Expr, MCContext &Ctx)
 
static const Nios2MCExprcreate (const MCSymbol *Symbol, Nios2MCExpr::Nios2ExprKind Kind, MCContext &Ctx)
 
- Static Public Member Functions inherited from llvm::MCTargetExpr
static bool classof (const MCExpr *E)
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::MCTargetExpr
 MCTargetExpr ()
 
virtual ~MCTargetExpr ()=default
 
- 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 19 of file Nios2MCExpr.h.

Member Enumeration Documentation

◆ Nios2ExprKind

Enumerator
CEK_None 
CEK_ABS_HI 
CEK_ABS_LO 
CEK_Special 

Definition at line 21 of file Nios2MCExpr.h.

Member Function Documentation

◆ create() [1/2]

const Nios2MCExpr * Nios2MCExpr::create ( Nios2MCExpr::Nios2ExprKind  Kind,
const MCExpr Expr,
MCContext Ctx 
)
static

Definition at line 23 of file Nios2MCExpr.cpp.

Referenced by LowerSymbolOperand().

◆ create() [2/2]

const Nios2MCExpr * Nios2MCExpr::create ( const MCSymbol Symbol,
Nios2MCExpr::Nios2ExprKind  Kind,
MCContext Ctx 
)
static

◆ evaluateAsRelocatableImpl()

bool Nios2MCExpr::evaluateAsRelocatableImpl ( MCValue Res,
const MCAsmLayout Layout,
const MCFixup Fixup 
) const
overridevirtual

Implements llvm::MCTargetExpr.

Definition at line 56 of file Nios2MCExpr.cpp.

References llvm::MCExpr::evaluateAsRelocatable(), and getSubExpr().

Referenced by getSubExpr().

◆ findAssociatedFragment()

MCFragment* llvm::Nios2MCExpr::findAssociatedFragment ( ) const
inlineoverridevirtual

◆ fixELFSymbolsInTLSFixups()

void Nios2MCExpr::fixELFSymbolsInTLSFixups ( MCAssembler Asm) const
overridevirtual

Implements llvm::MCTargetExpr.

Definition at line 66 of file Nios2MCExpr.cpp.

References CEK_ABS_HI, CEK_ABS_LO, CEK_None, CEK_Special, getKind(), and llvm_unreachable.

Referenced by findAssociatedFragment().

◆ getKind()

Nios2ExprKind llvm::Nios2MCExpr::getKind ( ) const
inline

Get the kind of this expression.

Definition at line 43 of file Nios2MCExpr.h.

Referenced by fixELFSymbolsInTLSFixups().

◆ getSubExpr()

const MCExpr* llvm::Nios2MCExpr::getSubExpr ( ) const
inline

Get the child of this expression.

Definition at line 46 of file Nios2MCExpr.h.

References evaluateAsRelocatableImpl(), Fixup, printImpl(), and visitUsedExpr().

Referenced by evaluateAsRelocatableImpl(), findAssociatedFragment(), and visitUsedExpr().

◆ printImpl()

void Nios2MCExpr::printImpl ( raw_ostream OS,
const MCAsmInfo MAI 
) const
overridevirtual

Implements llvm::MCTargetExpr.

Definition at line 36 of file Nios2MCExpr.cpp.

References CEK_ABS_HI, CEK_ABS_LO, CEK_None, CEK_Special, llvm_unreachable, and llvm::MCExpr::print().

Referenced by getSubExpr().

◆ visitUsedExpr()

void Nios2MCExpr::visitUsedExpr ( MCStreamer Streamer) const
overridevirtual

Implements llvm::MCTargetExpr.

Definition at line 62 of file Nios2MCExpr.cpp.

References getSubExpr(), and llvm::MCStreamer::visitUsedExpr().

Referenced by getSubExpr().


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