LLVM API Documentation
#include <ELFWriter.h>
Inheritance diagram for llvm::ELFWriter:
Public Types | |
typedef std::vector< unsigned char > | DataBuffer |
Public Member Functions | |
MachineCodeEmitter & | getMachineCodeEmitter () const |
~ELFWriter () | |
Protected Member Functions | |
ELFWriter (std::ostream &O, TargetMachine &TM) | |
bool | doInitialization (Module &M) |
bool | runOnMachineFunction (MachineFunction &MF) |
bool | doFinalization (Module &M) |
Protected Attributes | |
std::ostream & | O |
TargetMachine & | TM |
Mangler * | Mang |
ELFCodeEmitter * | MCE |
unsigned short | e_machine |
unsigned | e_flags |
bool | is64Bit |
bool | isLittleEndian |
Friends | |
class | ELFCodeEmitter |
Classes | |
struct | ELFSection |
struct | ELFSym |
Definition at line 30 of file ELFWriter.h.
typedef std::vector<unsigned char> llvm::ELFWriter::DataBuffer |
Definition at line 39 of file ELFWriter.h.
ELFWriter::~ELFWriter | ( | ) |
ELFWriter::ELFWriter | ( | std::ostream & | O, | |
TargetMachine & | TM | |||
) | [protected] |
Definition at line 161 of file ELFWriter.cpp.
References e_flags, e_machine, ELFCodeEmitter, llvm::TargetData::getPointerSizeInBits(), llvm::TargetMachine::getTargetData(), is64Bit, llvm::TargetData::isLittleEndian(), isLittleEndian, MCE, and TM.
MachineCodeEmitter& llvm::ELFWriter::getMachineCodeEmitter | ( | ) | const [inline] |
bool ELFWriter::doInitialization | ( | Module & | M | ) | [protected, virtual] |
doInitialization - Emit the file header and all of the global variables for the module to the ELF file.
Reimplemented from llvm::FunctionPass.
Definition at line 179 of file ELFWriter.cpp.
References e_flags, e_machine, is64Bit, isLittleEndian, M, and Mang.
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 308 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'.
Reimplemented from llvm::FunctionPass.
Definition at line 315 of file ELFWriter.cpp.
References E, llvm::Module::global_begin(), llvm::Module::global_end(), M, and Mang.
friend class ELFCodeEmitter [friend] |
std::ostream& llvm::ELFWriter::O [protected] |
Output stream to send the resultant object file to.
Definition at line 46 of file ELFWriter.h.
TargetMachine& llvm::ELFWriter::TM [protected] |
Mangler* llvm::ELFWriter::Mang [protected] |
Mang - The object used to perform name mangling for this module.
Definition at line 54 of file ELFWriter.h.
Referenced by doFinalization(), and doInitialization().
ELFCodeEmitter* llvm::ELFWriter::MCE [protected] |
MCE - The MachineCodeEmitter object that we are exposing to emit machine code for functions to the .o file.
Definition at line 58 of file ELFWriter.h.
Referenced by ELFWriter(), getMachineCodeEmitter(), and ~ELFWriter().
unsigned short llvm::ELFWriter::e_machine [protected] |
unsigned llvm::ELFWriter::e_flags [protected] |
bool llvm::ELFWriter::is64Bit [protected] |
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 77 of file ELFWriter.h.
Referenced by doInitialization(), and ELFWriter().
bool llvm::ELFWriter::isLittleEndian [protected] |