summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-20 05:58:47 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-20 05:58:47 +0000
commite76a33b9567d78a5744dc52fcec3a6056d6fb576 (patch)
treed596c974752c25f568db0e97529712c1f00dde1a /lib/CodeGen/LLVMTargetMachine.cpp
parent86c98145b268a0d10e062792f98bc8eea6b639b4 (diff)
downloadllvm-e76a33b9567d78a5744dc52fcec3a6056d6fb576.tar.gz
llvm-e76a33b9567d78a5744dc52fcec3a6056d6fb576.tar.bz2
llvm-e76a33b9567d78a5744dc52fcec3a6056d6fb576.tar.xz
Add MCObjectFileInfo and sink the MCSections initialization code from
TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index f36836237e..1a4a6546fc 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -30,6 +30,7 @@
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetInstrInfo.h"
+#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetRegistry.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include "llvm/Transforms/Scalar.h"
@@ -373,7 +374,9 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
// all the per-module stuff we're generating, including MCContext.
TargetAsmInfo *TAI = new TargetAsmInfo(*this);
MachineModuleInfo *MMI = new MachineModuleInfo(*getMCAsmInfo(),
- *getRegisterInfo(), TAI);
+ *getRegisterInfo(),
+ &getTargetLowering()->getObjFileLowering(),
+ TAI);
PM.add(MMI);
OutContext = &MMI->getContext(); // Return the MCContext specifically by-ref.