diff options
| author | Devang Patel <dpatel@apple.com> | 2008-06-18 02:12:09 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2008-06-18 02:12:09 +0000 |
| commit | 772a008738efbedfc8e4a80711cd8bfa1a619774 (patch) | |
| tree | 550c837edc4098892a568e98923dcd24f5e1f74f | |
| parent | 7cc14c55da14510bed3bd339a7b0408a55280745 (diff) | |
| download | bcm5719-llvm-772a008738efbedfc8e4a80711cd8bfa1a619774.tar.gz bcm5719-llvm-772a008738efbedfc8e4a80711cd8bfa1a619774.zip | |
Check empty dominance frontier.
llvm-svn: 52437
| -rw-r--r-- | llvm/include/llvm/Analysis/Dominators.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/Dominators.h b/llvm/include/llvm/Analysis/Dominators.h index 6ce3260b8f5..52171d7e12c 100644 --- a/llvm/include/llvm/Analysis/Dominators.h +++ b/llvm/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) { |

