diff options
Diffstat (limited to 'lib/CodeGen/ELFWriter.h')
-rw-r--r-- | lib/CodeGen/ELFWriter.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/CodeGen/ELFWriter.h b/lib/CodeGen/ELFWriter.h index bab118c6e3..b257cfb9ee 100644 --- a/lib/CodeGen/ELFWriter.h +++ b/lib/CodeGen/ELFWriter.h @@ -24,15 +24,16 @@ namespace llvm { class Constant; class ConstantStruct; class ELFCodeEmitter; + class ELFRelocation; + class ELFSection; + class ELFSym; class GlobalVariable; class Mangler; class MachineCodeEmitter; + class ObjectCodeEmitter; class TargetAsmInfo; class TargetELFWriterInfo; class raw_ostream; - class ELFSection; - class ELFSym; - class ELFRelocation; /// ELFWriter - This class implements the common target-independent code for /// writing ELF files. Targets should derive a class from this to @@ -43,15 +44,14 @@ namespace llvm { public: static char ID; - MachineCodeEmitter &getMachineCodeEmitter() const { - return *(MachineCodeEmitter*)MCE; + /// Return the ELFCodeEmitter as an instance of ObjectCodeEmitter + ObjectCodeEmitter *getObjectCodeEmitter() { + return reinterpret_cast<ObjectCodeEmitter*>(ElfCE); } ELFWriter(raw_ostream &O, TargetMachine &TM); ~ELFWriter(); - typedef std::vector<unsigned char> DataBuffer; - protected: /// Output stream to send the resultant object file to. raw_ostream &O; @@ -67,7 +67,7 @@ namespace llvm { /// MCE - The MachineCodeEmitter object that we are exposing to emit machine /// code for functions to the .o file. - ELFCodeEmitter *MCE; + ELFCodeEmitter *ElfCE; /// TAI - Target Asm Info, provide information about section names for /// globals and other target specific stuff. |