From fe2c11ffd6b0ac7686ac99ad5e53e6a8e3dfe151 Mon Sep 17 00:00:00 2001 From: Gerolf Hoflehner Date: Wed, 13 Aug 2014 22:07:36 +0000 Subject: [MachineCombiner] Removal of dangling DBG_VALUES after combining [20598] This is a cleaner solution to the problem described in r215431. When instructions are combined a dangling DBG_VALUE is removed. This resolves bug 20598. llvm-svn: 215587 --- llvm/lib/CodeGen/MachineCombiner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp index 032b4ee5cbb..aeb864efa34 100644 --- a/llvm/lib/CodeGen/MachineCombiner.cpp +++ b/llvm/lib/CodeGen/MachineCombiner.cpp @@ -380,7 +380,7 @@ bool MachineCombiner::combineInstructions(MachineBasicBlock *MBB) { MBB->insert((MachineBasicBlock::iterator) & MI, (MachineInstr *)InstrPtr); for (auto *InstrPtr : DelInstrs) - InstrPtr->eraseFromParent(); + InstrPtr->eraseFromParentAndMarkDBGValuesForRemoval(); Changed = true; ++NumInstCombined; -- cgit v1.2.3