[llvm-commits] [llvm] r51211 - /llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
Dale Johannesen
dalej at apple.com
Fri May 16 16:18:52 PDT 2008
Author: johannes
Date: Fri May 16 18:18:52 2008
New Revision: 51211
URL: http://llvm.org/viewvc/llvm-project?rev=51211&view=rev
Log:
Less conservative verison of previous patch,
suggested by Duncan.
Modified:
llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
Modified: llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PruneEH.cpp?rev=51211&r1=51210&r2=51211&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PruneEH.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PruneEH.cpp Fri May 16 18:18:52 2008
@@ -73,10 +73,10 @@
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 {
More information about the llvm-commits
mailing list