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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8516 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-09-15 02:22:50 +00:00
parent f6ba6555d3
commit ad9b5f31ea

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;