Fix bug: PruneEH/2003-09-14-ExternalCall.llx

llvm-svn: 8516
This commit is contained in:
Chris Lattner 2003-09-15 02:22:50 +00:00
parent f654287502
commit 5a6fa29eb3
1 changed files with 4 additions and 1 deletions

View File

@ -48,11 +48,14 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
std::find(SCC.begin(), SCC.end(), SCC[i]) == SCC.end()) {
SCCMightThrow = true; break;
} else if (Function *F = SCC[i]->getFunction())
if (!F->isExternal())
if (F->isExternal()) {
SCCMightThrow = true; break;
} else {
for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I)
if (isa<UnwindInst>(I->getTerminator())) { // Uses unwind!
SCCMightThrow = true; break;
}
}
bool MadeChange = false;