diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-10-16 18:21:33 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-10-16 18:21:33 +0000 |
| commit | 98e541457bbe04c22364ff82ef7aea34480012d5 (patch) | |
| tree | a64a5f11be5440ac73af85796d6a7a72ad3f4277 /llvm/lib/Analysis/PostDominators.cpp | |
| parent | 61753bf84796694f1165e333c3190cc02ea03ba1 (diff) | |
| download | bcm5719-llvm-98e541457bbe04c22364ff82ef7aea34480012d5.tar.gz bcm5719-llvm-98e541457bbe04c22364ff82ef7aea34480012d5.zip | |
Add support for unreachable
llvm-svn: 17056
Diffstat (limited to 'llvm/lib/Analysis/PostDominators.cpp')
| -rw-r--r-- | llvm/lib/Analysis/PostDominators.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/PostDominators.cpp b/llvm/lib/Analysis/PostDominators.cpp index 08822949c62..4f9d1d16069 100644 --- a/llvm/lib/Analysis/PostDominators.cpp +++ b/llvm/lib/Analysis/PostDominators.cpp @@ -40,8 +40,7 @@ bool PostDominatorSet::runOnFunction(Function &F) { for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) { Doms[I]; // Initialize to empty - if (isa<ReturnInst>(I->getTerminator()) || - isa<UnwindInst>(I->getTerminator())) + if (succ_begin(I) == succ_end(I)) Roots.push_back(I); } |

