summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ELFWriter.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-07-06 05:09:34 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-07-06 05:09:34 +0000
commit5661ea68e7ad13cbc166f6ec0f349af773369b5b (patch)
tree6e61eab3a2d47168f32e41462b4a71a14fbc12f8 /llvm/lib/CodeGen/ELFWriter.cpp
parent1fb1cf4e26c18f9763e528dfbbc1c2efd3112d7b (diff)
downloadbcm5719-llvm-5661ea68e7ad13cbc166f6ec0f349af773369b5b.tar.gz
bcm5719-llvm-5661ea68e7ad13cbc166f6ec0f349af773369b5b.zip
Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
cleanup, removed some #includes and moved Object Code Emitter out-of-line. llvm-svn: 74813
Diffstat (limited to 'llvm/lib/CodeGen/ELFWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/ELFWriter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp
index 9e915245525..53e4da58459 100644
--- a/llvm/lib/CodeGen/ELFWriter.cpp
+++ b/llvm/lib/CodeGen/ELFWriter.cpp
@@ -40,6 +40,8 @@
#include "llvm/CodeGen/BinaryObject.h"
#include "llvm/CodeGen/FileWriters.h"
#include "llvm/CodeGen/MachineCodeEmitter.h"
+#include "llvm/CodeGen/ObjectCodeEmitter.h"
+#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetData.h"
@@ -54,12 +56,12 @@ using namespace llvm;
char ELFWriter::ID = 0;
/// AddELFWriter - Concrete function to add the ELF writer to the function pass
/// manager.
-MachineCodeEmitter *llvm::AddELFWriter(PassManagerBase &PM,
+ObjectCodeEmitter *llvm::AddELFWriter(PassManagerBase &PM,
raw_ostream &O,
TargetMachine &TM) {
ELFWriter *EW = new ELFWriter(O, TM);
PM.add(EW);
- return &EW->getMachineCodeEmitter();
+ return (ObjectCodeEmitter*) &EW->getMachineCodeEmitter();
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud