LLVM API Documentation

llvm::MCContext Class Reference

#include <MCContext.h>

Collaboration diagram for llvm::MCContext:
[legend]

List of all members.

Public Member Functions

 MCContext ()
 ~MCContext ()
MCSymbol * CreateSymbol (const StringRef &Name)
MCSymbol * GetOrCreateSymbol (const StringRef &Name)
MCSymbol * CreateTemporarySymbol (const StringRef &Name="")
MCSymbol * LookupSymbol (const StringRef &Name) const
 LookupSymbol - Get the symbol for.
void ClearSymbolValue (MCSymbol *Symbol)
void SetSymbolValue (MCSymbol *Symbol, const MCValue &Value)
const MCValue * GetSymbolValue (MCSymbol *Symbol) const
void * Allocate (unsigned Size, unsigned Align=8)
void Deallocate (void *Ptr)


Detailed Description

MCContext - Context object for machine code objects. This class owns all of the sections that it creates.

Definition at line 26 of file MCContext.h.


Constructor & Destructor Documentation

MCContext::MCContext (  ) 

Definition at line 17 of file MCContext.cpp.

MCContext::~MCContext (  ) 

Definition at line 20 of file MCContext.cpp.


Member Function Documentation

MCSymbol * MCContext::CreateSymbol ( const StringRef &  Name  ) 

CreateSymbol - Create a new symbol with the specified

Parameters:
Name. 
Name - The symbol name, which must be unique across all symbols.

Definition at line 25 of file MCContext.cpp.

References Entry.

MCSymbol * MCContext::GetOrCreateSymbol ( const StringRef &  Name  ) 

GetOrCreateSymbol - Lookup the symbol inside with the specified

Parameters:
Name. If it exists, return it. If not, create a forward reference and return it.
Name - The symbol name, which must be unique across all symbols.

Definition at line 34 of file MCContext.cpp.

References Entry.

Referenced by llvm::X86ATTAsmPrinter::GetPICBaseSymbol(), llvm::X86ATTAsmPrinter::LowerExternalSymbolOperand(), and llvm::X86ATTAsmPrinter::LowerGlobalAddressOperand().

MCSymbol * MCContext::CreateTemporarySymbol ( const StringRef &  Name = ""  ) 

CreateTemporarySymbol - Create a new temporary symbol with the specified

Parameters:
Name. 
Name - The symbol name, for debugging purposes only, temporary symbols do not surive assembly. If non-empty the name must be unique across all symbols.

Definition at line 42 of file MCContext.cpp.

References llvm::StringRef::empty(), and Entry.

MCSymbol * MCContext::LookupSymbol ( const StringRef &  Name  )  const

LookupSymbol - Get the symbol for.

Parameters:
Name,or null.

Definition at line 53 of file MCContext.cpp.

void MCContext::ClearSymbolValue ( MCSymbol *  Symbol  ) 

ClearSymbolValue - Erase a value binding for

Parameters:
Symbol,if one exists.

Definition at line 57 of file MCContext.cpp.

void MCContext::SetSymbolValue ( MCSymbol *  Symbol,
const MCValue &  Value 
)

SetSymbolValue - Set the value binding for

Parameters:
Symbol to
Value. 

Definition at line 61 of file MCContext.cpp.

const MCValue * MCContext::GetSymbolValue ( MCSymbol *  Symbol  )  const

GetSymbolValue - Return the current value for

Parameters:
Symbol,or null if none exists.

Definition at line 65 of file MCContext.cpp.

void* llvm::MCContext::Allocate ( unsigned  Size,
unsigned  Align = 8 
) [inline]

Definition at line 85 of file MCContext.h.

References Align, and llvm::BumpPtrAllocator::Allocate().

Referenced by operator new(), and operator new[]().

void llvm::MCContext::Deallocate ( void *  Ptr  )  [inline]

Definition at line 88 of file MCContext.h.

Referenced by operator delete().


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