From 60330ff193a03c02f0b0eabb17fa938c4bef6f59 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 14 Feb 2006 20:14:17 +0000 Subject: [PATCH] add an assert git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26178 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/LoopInfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp index 20b470f3eb4..2860aa492ce 100644 --- a/lib/Analysis/LoopInfo.cpp +++ b/lib/Analysis/LoopInfo.cpp @@ -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))