[llvm-commits] [llvm] r125101 - /llvm/trunk/lib/CodeGen/SplitKit.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Feb 8 10:50:19 PST 2011
Author: stoklund
Date: Tue Feb 8 12:50:18 2011
New Revision: 125101
URL: http://llvm.org/viewvc/llvm-project?rev=125101&view=rev
Log:
Add assertion.
Modified:
llvm/trunk/lib/CodeGen/SplitKit.cpp
Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=125101&r1=125100&r2=125101&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SplitKit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Feb 8 12:50:18 2011
@@ -857,9 +857,10 @@
}
DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
- MachineBasicBlock::iterator MII = LIS.getInstructionFromIndex(Idx);
- VNInfo *VNI = defFromParent(0, ParentVNI, Idx,
- *MII->getParent(), llvm::next(MII));
+ MachineInstr *MI = LIS.getInstructionFromIndex(Idx);
+ assert(MI && "No instruction at index");
+ VNInfo *VNI = defFromParent(0, ParentVNI, Idx, *MI->getParent(),
+ llvm::next(MachineBasicBlock::iterator(MI)));
return VNI->def;
}
More information about the llvm-commits
mailing list