From 7329276511a1fb213acdbfd8ef7623a66013de5e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 20 Dec 2006 21:20:13 +0000 Subject: [PATCH] Fix Regression/Verifier/invoke-1.ll llvm-svn: 32722 --- lib/VMCore/Verifier.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index b26248b897d..ea30ca48a7f 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -902,6 +902,10 @@ void Verifier::visitInstruction(Instruction &I) { if (InvokeInst *II = dyn_cast(Op)) { OpBlock = II->getNormalDest(); + Assert2(OpBlock != II->getUnwindDest(), + "No uses of invoke possible due to dominance structure!", + Op, II); + // If the normal successor of an invoke instruction has multiple // predecessors, then the normal edge from the invoke is critical, so // the invoke value can only be live if the destination block @@ -931,8 +935,9 @@ void Verifier::visitInstruction(Instruction &I) { } } } - Assert1(!Bad, - "Invoke value defined on critical edge but not dead!", &I); + Assert2(!Bad, + "Invoke value defined on critical edge but not dead!", &I, + Op); } } else if (OpBlock == BB) { // If they are in the same basic block, make sure that the definition