aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ELFWriter.h
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-07-06 09:26:48 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-07-06 09:26:48 +0000
commit6933d3eff8e47a64803ece18b5a78748a674dc43 (patch)
tree2d97548b1e1ba59ca2b0a72f21aa11fbf92ddc80 /lib/CodeGen/ELFWriter.h
parentd7649417d1b9017973d63f61abef8a03f1c4e1db (diff)
Changed ELFCodeEmitter to inherit from ObjectCodeEmitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ELFWriter.h')
-rw-r--r--lib/CodeGen/ELFWriter.h16
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.