LLVM API Documentation

llvm::MachOCodeEmitter Class Reference

Inheritance diagram for llvm::MachOCodeEmitter:
[legend]
Collaboration diagram for llvm::MachOCodeEmitter:
[legend]

List of all members.

Public Member Functions

 MachOCodeEmitter (MachOWriter &mow)
virtual void startFunction (MachineFunction &MF)
virtual bool finishFunction (MachineFunction &MF)
virtual void addRelocation (const MachineRelocation &MR)
void emitConstantPool (MachineConstantPool *MCP)
void emitJumpTables (MachineJumpTableInfo *MJTI)
virtual uintptr_t getConstantPoolEntryAddress (unsigned Index) const
 FIXME: These should all be handled with relocations!
virtual uintptr_t getJumpTableEntryAddress (unsigned Index) const
virtual void StartMachineBasicBlock (MachineBasicBlock *MBB)
virtual uintptr_t getMachineBasicBlockAddress (MachineBasicBlock *MBB) const
virtual uintptr_t getLabelAddress (uint64_t Label) const
virtual void emitLabel (uint64_t LabelID)
 emitLabel - Emits a label
virtual void setModuleInfo (llvm::MachineModuleInfo *MMI)
virtual void startGVStub (const GlobalValue *F, unsigned StubSize, unsigned Alignment=1)
 JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!
virtual void * finishGVStub (const GlobalValue *F)


Detailed Description

MachOCodeEmitter - This class is used by the MachOWriter to emit the code for functions to the Mach-O file.

Definition at line 62 of file MachOWriter.cpp.


Constructor & Destructor Documentation

llvm::MachOCodeEmitter::MachOCodeEmitter ( MachOWriter &  mow  )  [inline]


Member Function Documentation

void MachOCodeEmitter::startFunction ( MachineFunction &  MF  )  [virtual]

bool MachOCodeEmitter::finishFunction ( MachineFunction &  MF  )  [virtual]

virtual void llvm::MachOCodeEmitter::addRelocation ( const MachineRelocation &  MR  )  [inline, virtual]

addRelocation - Whenever a relocatable address is needed, it should be noted with this interface.

Implements llvm::MachineCodeEmitter.

Definition at line 102 of file MachOWriter.cpp.

References Relocations.

void MachOCodeEmitter::emitConstantPool ( MachineConstantPool *  MCP  ) 

void MachOCodeEmitter::emitJumpTables ( MachineJumpTableInfo *  MJTI  ) 

virtual uintptr_t llvm::MachOCodeEmitter::getConstantPoolEntryAddress ( unsigned  Index  )  const [inline, virtual]

FIXME: These should all be handled with relocations!

getConstantPoolEntryAddress - Return the address of the 'Index' entry in the constant pool that was last emitted with the emitConstantPool method.

Implements llvm::MachineCodeEmitter.

Definition at line 109 of file MachOWriter.cpp.

Referenced by finishFunction().

virtual uintptr_t llvm::MachOCodeEmitter::getJumpTableEntryAddress ( unsigned  Index  )  const [inline, virtual]

getJumpTableEntryAddress - Return the address of the jump table with index 'Index' in the function that last called initJumpTableInfo.

Implements llvm::MachineCodeEmitter.

Definition at line 113 of file MachOWriter.cpp.

Referenced by finishFunction().

virtual void llvm::MachOCodeEmitter::StartMachineBasicBlock ( MachineBasicBlock *  MBB  )  [inline, virtual]

StartMachineBasicBlock - This should be called by the target when a new basic block is about to be emitted. This way the MCE knows where the start of the block is, and can implement getMachineBasicBlockAddress.

Implements llvm::MachineCodeEmitter.

Definition at line 118 of file MachOWriter.cpp.

References llvm::MachineBasicBlock::getNumber(), and MBBLocations.

virtual uintptr_t llvm::MachOCodeEmitter::getMachineBasicBlockAddress ( MachineBasicBlock *  MBB  )  const [inline, virtual]

getMachineBasicBlockAddress - Return the address of the specified MachineBasicBlock, only usable after the label for the MBB has been emitted.

Implements llvm::MachineCodeEmitter.

Definition at line 124 of file MachOWriter.cpp.

References llvm::MachineBasicBlock::getNumber(), and MBBLocations.

Referenced by finishFunction().

virtual uintptr_t llvm::MachOCodeEmitter::getLabelAddress ( uint64_t  LabelID  )  const [inline, virtual]

getLabelAddress - Return the address of the specified LabelID, only usable after the LabelID has been emitted.

Implements llvm::MachineCodeEmitter.

Definition at line 130 of file MachOWriter.cpp.

virtual void llvm::MachOCodeEmitter::emitLabel ( uint64_t  LabelID  )  [inline, virtual]

emitLabel - Emits a label

Implements llvm::MachineCodeEmitter.

Definition at line 136 of file MachOWriter.cpp.

virtual void llvm::MachOCodeEmitter::setModuleInfo ( llvm::MachineModuleInfo *  Info  )  [inline, virtual]

Specifies the MachineModuleInfo object. This is used for exception handling purposes.

Implements llvm::MachineCodeEmitter.

Definition at line 142 of file MachOWriter.cpp.

virtual void llvm::MachOCodeEmitter::startGVStub ( const GlobalValue *  F,
unsigned  StubSize,
unsigned  Alignment = 1 
) [inline, virtual]

JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!

Implements llvm::MachineCodeEmitter.

Definition at line 145 of file MachOWriter.cpp.

virtual void* llvm::MachOCodeEmitter::finishGVStub ( const GlobalValue *  F  )  [inline, virtual]

finishGVStub - This callback is invoked to terminate a GV stub.

Implements llvm::MachineCodeEmitter.

Definition at line 150 of file MachOWriter.cpp.


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