diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-05-03 15:48:34 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-05-03 15:48:34 +0000 |
commit | 333403abbda5722724025cda1f8f52ef36d31505 (patch) | |
tree | ccc9e55962e8420600335135333e8a42d1e22fee /lib/Analysis | |
parent | e050e59a47a50f7236de8a1678a6a7c5e2e693c8 (diff) | |
download | external_llvm-333403abbda5722724025cda1f8f52ef36d31505.zip external_llvm-333403abbda5722724025cda1f8f52ef36d31505.tar.gz external_llvm-333403abbda5722724025cda1f8f52ef36d31505.tar.bz2 |
RegionInfo: Do not crash if unreachable block is found
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/RegionInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp index 81ef650..8577025 100644 --- a/lib/Analysis/RegionInfo.cpp +++ b/lib/Analysis/RegionInfo.cpp @@ -114,7 +114,8 @@ void Region::replaceExitRecursive(BasicBlock *NewExit) { bool Region::contains(const BasicBlock *B) const { BasicBlock *BB = const_cast<BasicBlock*>(B); - assert(DT->getNode(BB) && "BB not part of the dominance tree"); + if (!DT->getNode(BB)) + return false; BasicBlock *entry = getEntry(), *exit = getExit(); |