diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-07-06 05:09:34 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-07-06 05:09:34 +0000 |
commit | aabb9a5359cbb0bf9d25bfb917ecb09c086d034b (patch) | |
tree | 95b0b0f5302bb05adb156b329f422d1399de236e /tools/lto | |
parent | 086ea05299f2a6ffc2e283c70ef4ef39897db6a3 (diff) | |
download | external_llvm-aabb9a5359cbb0bf9d25bfb917ecb09c086d034b.zip external_llvm-aabb9a5359cbb0bf9d25bfb917ecb09c086d034b.tar.gz external_llvm-aabb9a5359cbb0bf9d25bfb917ecb09c086d034b.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 1a21132..801707f 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -430,16 +430,16 @@ bool LTOCodeGenerator::generateAssemblyCode(raw_ostream& out, codeGenPasses->add(new TargetData(*_target->getTargetData())); - MachineCodeEmitter* mce = NULL; + ObjectCodeEmitter* oce = NULL; switch (_target->addPassesToEmitFile(*codeGenPasses, out, TargetMachine::AssemblyFile, CodeGenOpt::Aggressive)) { case FileModel::MachOFile: - mce = AddMachOWriter(*codeGenPasses, out, *_target); + oce = AddMachOWriter(*codeGenPasses, out, *_target); break; case FileModel::ElfFile: - mce = AddELFWriter(*codeGenPasses, out, *_target); + oce = AddELFWriter(*codeGenPasses, out, *_target); break; case FileModel::AsmFile: break; @@ -449,7 +449,7 @@ bool LTOCodeGenerator::generateAssemblyCode(raw_ostream& out, return true; } - if (_target->addPassesToEmitFileFinish(*codeGenPasses, mce, + if (_target->addPassesToEmitFileFinish(*codeGenPasses, oce, CodeGenOpt::Aggressive)) { errMsg = "target does not support generation of this file type"; return true; |