aboutsummaryrefslogtreecommitdiffstats
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
commit2bcbd2e4b520c7bd24d846c4c4f1d618ab57f0fb (patch)
tree2d97548b1e1ba59ca2b0a72f21aa11fbf92ddc80 /lib/CodeGen/ELFWriter.h
parentef14b9180ee2b1a7dd8371b4be5a44f6604ece2d (diff)
downloadexternal_llvm-2bcbd2e4b520c7bd24d846c4c4f1d618ab57f0fb.zip
external_llvm-2bcbd2e4b520c7bd24d846c4c4f1d618ab57f0fb.tar.gz
external_llvm-2bcbd2e4b520c7bd24d846c4c4f1d618ab57f0fb.tar.bz2
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 bab118c..b257cfb 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.