summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/MI/LiveIntervalTest.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-08-24 00:42:05 +0000
committerMatthias Braun <matze@braunis.de>2016-08-24 00:42:05 +0000
commitc3b2e80b9d7615190bb5d50f17d6524c2fd8d66d (patch)
tree464f32d68c01481e6c6ec8ec9d6954ebd7a4f5be /llvm/unittests/MI/LiveIntervalTest.cpp
parent7fe0681e28379ed875367b7fdd4032b761c0bc1c (diff)
downloadbcm5719-llvm-c3b2e80b9d7615190bb5d50f17d6524c2fd8d66d.tar.gz
bcm5719-llvm-c3b2e80b9d7615190bb5d50f17d6524c2fd8d66d.zip
MachineModuleInfo: Avoid dummy constructor, use INITIALIZE_TM_PASS
Change this pass constructor to just accept a const TargetMachine * and use INITIALIZE_TM_PASS, that way we can get rid of the dummy constructor. The pass will still fail when calling the default constructor leading to TM == nullptr, this is no different than before but is more in line what other codegen passes are doing and avoids the dummy constructor. llvm-svn: 279598
Diffstat (limited to 'llvm/unittests/MI/LiveIntervalTest.cpp')
-rw-r--r--llvm/unittests/MI/LiveIntervalTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/MI/LiveIntervalTest.cpp b/llvm/unittests/MI/LiveIntervalTest.cpp
index 12c3ad66073..9f594e58de7 100644
--- a/llvm/unittests/MI/LiveIntervalTest.cpp
+++ b/llvm/unittests/MI/LiveIntervalTest.cpp
@@ -69,8 +69,8 @@ std::unique_ptr<Module> parseMIR(LLVMContext &Context,
if (!F)
return nullptr;
+ PM.add(new MachineModuleInfo(&TM));
const LLVMTargetMachine &LLVMTM = static_cast<const LLVMTargetMachine&>(TM);
- LLVMTM.addMachineModuleInfo(PM);
LLVMTM.addMachineFunctionAnalysis(PM, MIR.get());
return M;
OpenPOWER on IntegriCloud