From ac28fbd0436dd8b2bc0c071ba150b60bbfca67f3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 21 Nov 2005 07:06:27 +0000 Subject: Add section switching to common code generator code. Add a couple of asserts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24445 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LiveVariables.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/LiveVariables.cpp') diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index cb034c017a..a1bda195ff 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/lib/CodeGen/LiveVariables.cpp @@ -278,10 +278,11 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) { MachineOperand &MO = MI->getOperand(i); if (!MO.getVRegValueOrNull()) { VarInfo &VRInfo = getVarInfo(MO.getReg()); + assert(VRInfo.DefInst && "Register use before def (or no def)!"); - // Only mark it alive only in the block we are representing... + // Only mark it alive only in the block we are representing. MarkVirtRegAliveInBlock(VRInfo, MBB); - break; // Found the PHI entry for this block... + break; // Found the PHI entry for this block. } } } -- cgit v1.2.3-18-g5258