LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
llvm::MCValue Class Reference

#include <MCValue.h>

Public Member Functions

int64_t getConstant () const
 
const MCSymbolRefExprgetSymA () const
 
const MCSymbolRefExprgetSymB () const
 
bool isAbsolute () const
 isAbsolute - Is this an absolute (as opposed to relocatable) value. More...
 
void print (raw_ostream &OS, const MCAsmInfo *MAI) const
 print - Print the value to the stream OS. More...
 
void dump () const
 dump - Print the value to stderr. More...
 

Static Public Member Functions

static MCValue get (const MCSymbolRefExpr *SymA, const MCSymbolRefExpr *SymB=0, int64_t Val=0)
 
static MCValue get (int64_t Val)
 

Detailed Description

MCValue - This represents an "assembler immediate". In its most general form, this can hold "SymbolA - SymbolB + imm64". Not all targets supports relocations of this general form, but we need to represent this anyway.

In the general form, SymbolB can only be defined if SymbolA is, and both must be in the same (non-external) section. The latter constraint is not enforced, since a symbol's section may not be known at construction.

Note that this class must remain a simple POD value class, because we need it to live in unions etc.

Definition at line 37 of file MCValue.h.

Member Function Documentation

void MCValue::dump ( ) const

dump - Print the value to stderr.

Definition at line 35 of file MCValue.cpp.

References llvm::dbgs(), and print().

static MCValue llvm::MCValue::get ( const MCSymbolRefExpr SymA,
const MCSymbolRefExpr SymB = 0,
int64_t  Val = 0 
)
inlinestatic
static MCValue llvm::MCValue::get ( int64_t  Val)
inlinestatic

Definition at line 65 of file MCValue.h.

int64_t llvm::MCValue::getConstant ( ) const
inline
const MCSymbolRefExpr* llvm::MCValue::getSymA ( ) const
inline
const MCSymbolRefExpr* llvm::MCValue::getSymB ( ) const
inline
bool llvm::MCValue::isAbsolute ( ) const
inline

isAbsolute - Is this an absolute (as opposed to relocatable) value.

Definition at line 47 of file MCValue.h.

Referenced by llvm::PPCMCExpr::EvaluateAsRelocatableImpl(), getRelocType(), and print().

void MCValue::print ( raw_ostream OS,
const MCAsmInfo MAI 
) const

print - Print the value to the stream OS.

Definition at line 17 of file MCValue.cpp.

References getConstant(), getSymA(), getSymB(), isAbsolute(), and llvm::MCExpr::print().

Referenced by dump().


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