add an assert
authorChris Lattner <sabre@nondot.org>
Tue, 14 Feb 2006 20:14:17 +0000 (20:14 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 14 Feb 2006 20:14:17 +0000 (20:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26178 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LoopInfo.cpp

index 20b470f3eb4b64c410432186dd2624c5baf581c9..2860aa492ce6021d6a725f0aee530dbf80b172ca 100644 (file)
@@ -367,7 +367,8 @@ BasicBlock *Loop::getLoopPreheader() const {
       Out = *PI;
     }
 
-  // Make sure there is only one exit out of the preheader...
+  // Make sure there is only one exit out of the preheader.
+  assert(Out && "Header of loop has no predecessors from outside loop?");
   succ_iterator SI = succ_begin(Out);
   ++SI;
   if (SI != succ_end(Out))