From 8c3fbdc6c4649f8c3c018cf32be4407c672e574c Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 23 Aug 2016 22:08:27 +0000 Subject: Revert r279564. It introduces undefined behavior (binding a reference to a dereferenced null pointer) in MachineModuleInfo::MachineModuleInfo that causes -Werror builds (including several buildbots) to fail. llvm-svn: 279580 --- llvm/unittests/MI/LiveIntervalTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/unittests/MI/LiveIntervalTest.cpp') diff --git a/llvm/unittests/MI/LiveIntervalTest.cpp b/llvm/unittests/MI/LiveIntervalTest.cpp index 5fe5c916719..12c3ad66073 100644 --- a/llvm/unittests/MI/LiveIntervalTest.cpp +++ b/llvm/unittests/MI/LiveIntervalTest.cpp @@ -70,7 +70,8 @@ std::unique_ptr parseMIR(LLVMContext &Context, return nullptr; const LLVMTargetMachine &LLVMTM = static_cast(TM); - LLVMTM.addMachineModuleInfo(PM, MIR.get()); + LLVMTM.addMachineModuleInfo(PM); + LLVMTM.addMachineFunctionAnalysis(PM, MIR.get()); return M; } -- cgit v1.2.3