diff options
| author | Dale Johannesen <dalej@apple.com> | 2008-05-16 23:18:52 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2008-05-16 23:18:52 +0000 |
| commit | 5610dabac91eb7c97710d599e42fd918f1ac1507 (patch) | |
| tree | 9cab08b2edf587577243afad69738e860fd9552b /llvm/lib/Transforms/IPO/PruneEH.cpp | |
| parent | e45329448e87921def9bacc261d05f3b017e5b29 (diff) | |
| download | bcm5719-llvm-5610dabac91eb7c97710d599e42fd918f1ac1507.tar.gz bcm5719-llvm-5610dabac91eb7c97710d599e42fd918f1ac1507.zip | |
Less conservative verison of previous patch,
suggested by Duncan.
llvm-svn: 51211
Diffstat (limited to 'llvm/lib/Transforms/IPO/PruneEH.cpp')
| -rw-r--r-- | llvm/lib/Transforms/IPO/PruneEH.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp index d2f3a8437cf..d4194a1060e 100644 --- a/llvm/lib/Transforms/IPO/PruneEH.cpp +++ b/llvm/lib/Transforms/IPO/PruneEH.cpp @@ -73,10 +73,10 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) { for (unsigned i = 0, e = SCC.size(); (!SCCMightUnwind || !SCCMightReturn) && i != e; ++i) { Function *F = SCC[i]->getFunction(); - if (F == 0 || (F->hasWeakLinkage() && !F->doesNotThrow())) { + if (F == 0) { SCCMightUnwind = true; SCCMightReturn = true; - } else if (F->isDeclaration()) { + } else if (F->isDeclaration() || F->hasWeakLinkage()) { SCCMightUnwind |= !F->doesNotThrow(); SCCMightReturn |= !F->doesNotReturn(); } else { |

