aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-06-18 02:12:09 +0000
committerDevang Patel <dpatel@apple.com>2008-06-18 02:12:09 +0000
commit6d0cc55ef3f3f3c5829e3cc2bab841fd74b0f8cb (patch)
treec09091546657d5c7c806015a0b0ab157312360f5 /include
parent44f6a2c951b0536c6e4ab6f576f82676ed97322c (diff)
downloadexternal_llvm-6d0cc55ef3f3f3c5829e3cc2bab841fd74b0f8cb.zip
external_llvm-6d0cc55ef3f3f3c5829e3cc2bab841fd74b0f8cb.tar.gz
external_llvm-6d0cc55ef3f3f3c5829e3cc2bab841fd74b0f8cb.tar.bz2
Check empty dominance frontier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/Dominators.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 6ce3260..52171d7 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -944,6 +944,9 @@ public:
// itself is not member of NewBB's dominance frontier.
DominanceFrontier::iterator NewDFI = find(NewBB);
DominanceFrontier::iterator DFI = find(BB);
+ // If BB was an entry block then its frontier is empty.
+ if (DFI == end())
+ return;
DominanceFrontier::DomSetType BBSet = DFI->second;
for (DominanceFrontier::DomSetType::iterator BBSetI = BBSet.begin(),
BBSetE = BBSet.end(); BBSetI != BBSetE; ++BBSetI) {