[llvm-commits] CVS: llvm/lib/Transforms/IPO/PruneEH.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Sep 14 21:24:01 PDT 2003


Changes in directory llvm/lib/Transforms/IPO:

PruneEH.cpp updated: 1.3 -> 1.4

---
Log message:

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


---
Diffs of the changes:

Index: llvm/lib/Transforms/IPO/PruneEH.cpp
diff -u llvm/lib/Transforms/IPO/PruneEH.cpp:1.3 llvm/lib/Transforms/IPO/PruneEH.cpp:1.4
--- llvm/lib/Transforms/IPO/PruneEH.cpp:1.3	Mon Sep  8 14:44:23 2003
+++ llvm/lib/Transforms/IPO/PruneEH.cpp	Sun Sep 14 21:22:50 2003
@@ -48,11 +48,14 @@
         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;
 





More information about the llvm-commits mailing list