Fix Regression/Verifier/invoke-1.ll
authorChris Lattner <sabre@nondot.org>
Wed, 20 Dec 2006 21:20:13 +0000 (21:20 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 20 Dec 2006 21:20:13 +0000 (21:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32722 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Verifier.cpp

index b26248b897daf72a255569368afe480607053e86..ea30ca48a7f0a6a32c35b136f4ca7bf458a47532 100644 (file)
@@ -902,6 +902,10 @@ void Verifier::visitInstruction(Instruction &I) {
         if (InvokeInst *II = dyn_cast<InvokeInst>(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