LLVM API Documentation

llvm::ELFWriter Class Reference

#include <ELFWriter.h>

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

List of all members.

Public Member Functions

ObjectCodeEmitter * getObjectCodeEmitter ()
 Return the ELFCodeEmitter as an instance of ObjectCodeEmitter.
 ELFWriter (raw_ostream &O, TargetMachine &TM)
 ~ELFWriter ()

Static Public Attributes

static char ID = 0

Protected Member Functions

bool doInitialization (Module &M)
bool runOnMachineFunction (MachineFunction &MF)
bool doFinalization (Module &M)

Protected Attributes

raw_ostream & O
 Output stream to send the resultant object file to.
TargetMachine & TM
 Target machine description.
MCContext & OutContext
 Context object for machine code objects.
const TargetELFWriterInfo * TEW
 Target Elf Writer description.
Mangler * Mang
 Mang - The object used to perform name mangling for this module.
ELFCodeEmitter * ElfCE
const TargetLoweringObjectFile & TLOF
const TargetAsmInfo * TAI
bool is64Bit
bool isLittleEndian

Friends

class ELFCodeEmitter


Detailed Description

ELFWriter - This class implements the common target-independent code for writing ELF files. Targets should derive a class from this to parameterize the output format.

Definition at line 52 of file ELFWriter.h.


Constructor & Destructor Documentation

ELFWriter::ELFWriter ( raw_ostream &  O,
TargetMachine &  TM 
)

ELFWriter::~ELFWriter (  ) 

Definition at line 94 of file ELFWriter.cpp.

References ElfCE, and OutContext.


Member Function Documentation

ObjectCodeEmitter* llvm::ELFWriter::getObjectCodeEmitter (  )  [inline]

Return the ELFCodeEmitter as an instance of ObjectCodeEmitter.

Definition at line 58 of file ELFWriter.h.

References ElfCE.

Referenced by llvm::AddELFWriter().

bool ELFWriter::doInitialization ( Module &  M  )  [protected, virtual]

bool ELFWriter::runOnMachineFunction ( MachineFunction &  MF  )  [protected, virtual]

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.

Implements llvm::MachineFunctionPass.

Definition at line 661 of file ELFWriter.cpp.

bool ELFWriter::doFinalization ( Module &  M  )  [protected, virtual]

doFinalization - Now that the module has been completely processed, emit the ELF file to 'O'.

doFinalization - Now that the module has been completely processed, emit the ELF file to 'O'.

Reimplemented from llvm::FunctionPass.

Definition at line 668 of file ELFWriter.cpp.

References llvm::SetVector< T, Vector, Set >::begin(), llvm::SetVector< T, Vector, Set >::end(), llvm::ELFSym::getExtSym(), llvm::Module::getModuleIdentifier(), llvm::TargetAsmInfo::getNonexecutableStackDirective(), llvm::ELFSym::getSectionSym(), llvm::Module::global_begin(), llvm::Module::global_end(), Mang, llvm::ELFSection::SectionIdx, llvm::ELFSym::SectionIdx, llvm::ELFSection::Sym, and TAI.


Friends And Related Function Documentation

friend class ELFCodeEmitter [friend]

Definition at line 53 of file ELFWriter.h.

Referenced by ELFWriter().


Member Data Documentation

char ELFWriter::ID = 0 [static]

Definition at line 55 of file ELFWriter.h.

Output stream to send the resultant object file to.

Definition at line 67 of file ELFWriter.h.

Target machine description.

Definition at line 70 of file ELFWriter.h.

Referenced by doInitialization(), and ELFWriter().

Context object for machine code objects.

Definition at line 73 of file ELFWriter.h.

Referenced by doInitialization(), and ~ELFWriter().

Target Elf Writer description.

Definition at line 76 of file ELFWriter.h.

Referenced by doInitialization(), and ELFWriter().

Mang - The object used to perform name mangling for this module.

Definition at line 79 of file ELFWriter.h.

Referenced by doFinalization(), and doInitialization().

MCE - The MachineCodeEmitter object that we are exposing to emit machine code for functions to the .o file.

Definition at line 83 of file ELFWriter.h.

Referenced by ELFWriter(), getObjectCodeEmitter(), and ~ELFWriter().

TLOF - Target Lowering Object File, provide section names for globals and other object file specific stuff

Definition at line 87 of file ELFWriter.h.

Referenced by doInitialization().

const TargetAsmInfo* llvm::ELFWriter::TAI [protected]

TAI - Target Asm Info, provide information about section names for globals and other target specific stuff.

Definition at line 91 of file ELFWriter.h.

Referenced by doFinalization(), and ELFWriter().

is64Bit/isLittleEndian - This information is inferred from the target machine directly, indicating whether to emit a 32- or 64-bit ELF file.

Definition at line 99 of file ELFWriter.h.

Definition at line 99 of file ELFWriter.h.


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