X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FRegionInfo.cpp;h=decf070d4e52d95fa0136ab860015908babf5f44;hb=974a445bd90795248274493eda5cdbf6721910f7;hp=81ef6505e611cabecdb716b08150afc465eccce3;hpb=d03fdfb97c1a693101bfef5800c262237f5d382f;p=oota-llvm.git diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp index 81ef6505e61..decf070d4e5 100644 --- a/lib/Analysis/RegionInfo.cpp +++ b/lib/Analysis/RegionInfo.cpp @@ -9,6 +9,7 @@ // Detects single entry single exit regions in the control flow graph. //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "region" #include "llvm/Analysis/RegionInfo.h" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/Statistic.h" @@ -16,13 +17,10 @@ #include "llvm/Analysis/RegionIterator.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/ErrorHandling.h" - -#define DEBUG_TYPE "region" #include "llvm/Support/Debug.h" - -#include +#include "llvm/Support/ErrorHandling.h" #include +#include using namespace llvm; @@ -114,7 +112,8 @@ void Region::replaceExitRecursive(BasicBlock *NewExit) { bool Region::contains(const BasicBlock *B) const { BasicBlock *BB = const_cast(B); - assert(DT->getNode(BB) && "BB not part of the dominance tree"); + if (!DT->getNode(BB)) + return false; BasicBlock *entry = getEntry(), *exit = getExit();