diff options
author | Chris Lattner <sabre@nondot.org> | 2005-07-11 05:15:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-07-11 05:15:32 +0000 |
commit | 6871aed0320ed36eb290cd8f868e98535c00f3b1 (patch) | |
tree | 294da42319dfefba77f892e68cf948a75c69ba5b /include/llvm/CodeGen/ELFWriter.h | |
parent | 1ed38fb9a71150343dc9625e1808836b7f86d8f6 (diff) | |
download | external_llvm-6871aed0320ed36eb290cd8f868e98535c00f3b1.zip external_llvm-6871aed0320ed36eb290cd8f868e98535c00f3b1.tar.gz external_llvm-6871aed0320ed36eb290cd8f868e98535c00f3b1.tar.bz2 |
expose a new code emitter object
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22374 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/ELFWriter.h')
-rw-r--r-- | include/llvm/CodeGen/ELFWriter.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/ELFWriter.h b/include/llvm/CodeGen/ELFWriter.h index 4e94ee9..456f3b2 100644 --- a/include/llvm/CodeGen/ELFWriter.h +++ b/include/llvm/CodeGen/ELFWriter.h @@ -19,12 +19,22 @@ namespace llvm { class GlobalVariable; class Mangler; + class MachineCodeEmitter; + class ELFCodeEmitter; /// 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. /// class ELFWriter : public MachineFunctionPass { + friend class ELFCodeEmitter; + public: + MachineCodeEmitter &getMachineCodeEmitter() const { + return *(MachineCodeEmitter*)MCE; + } + + ~ELFWriter(); + protected: ELFWriter(std::ostream &O, TargetMachine &TM); @@ -40,6 +50,10 @@ namespace llvm { /// Mangler *Mang; + /// MCE - The MachineCodeEmitter object that we are exposing to emit machine + /// code for functions to the .o file. + ELFCodeEmitter *MCE; + //===------------------------------------------------------------------===// // Properties to be set by the derived class ctor, used to configure the // ELFWriter. @@ -143,7 +157,6 @@ namespace llvm { /// the local symbols first in the list). std::vector<ELFSym> SymbolTable; - // As we accumulate the ELF file into OutputBuffer, we occasionally need to // keep track of locations to update later (e.g. the location of the section // table in the ELF header. These members keep track of the offset in |