summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-05-16 23:18:52 +0000
committerDale Johannesen <dalej@apple.com>2008-05-16 23:18:52 +0000
commit1f7580c5ebfb3ab79c4be77cc5b85408bf3a8cf4 (patch)
tree9c64620056979ab129c14ef490b4c76a7e5187a5 /lib/Transforms/IPO
parent6a6f2dda36f2cff5cc97a2ffe0307da7b330a8b0 (diff)
downloadllvm-1f7580c5ebfb3ab79c4be77cc5b85408bf3a8cf4.tar.gz
llvm-1f7580c5ebfb3ab79c4be77cc5b85408bf3a8cf4.tar.bz2
llvm-1f7580c5ebfb3ab79c4be77cc5b85408bf3a8cf4.tar.xz
Less conservative verison of previous patch,
suggested by Duncan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/PruneEH.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index d2f3a8437c..d4194a1060 100644
--- a/lib/Transforms/IPO/PruneEH.cpp
+++ b/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 {