[llvm-branch-commits] [llvm-branch] r99696 - in /llvm/branches/Apple/Morbo: ./ lib/CodeGen/DwarfEHPrepare.cpp

Bill Wendling isanbard at gmail.com
Fri Mar 26 18:23:32 PDT 2010


Author: void
Date: Fri Mar 26 20:23:32 2010
New Revision: 99696

URL: http://llvm.org/viewvc/llvm-project?rev=99696&view=rev
Log:
$ svn merge -c 99695 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r99695 into '.':
U    lib/CodeGen/DwarfEHPrepare.cpp


Modified:
    llvm/branches/Apple/Morbo/   (props changed)
    llvm/branches/Apple/Morbo/lib/CodeGen/DwarfEHPrepare.cpp

Propchange: llvm/branches/Apple/Morbo/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Mar 26 20:23:32 2010
@@ -1,2 +1,2 @@
 /llvm/branches/Apple/Hermes:96832,96835,96858,96870,96876,96879
-/llvm/trunk:98602,98604,98612,98615-98616,98675,98686,98743-98744,98773,98778,98780,98810,98835,98839,98845,98855,98862,98881,98920,98977,99032-99033,99043,99223,99263,99282-99284,99306,99319-99321,99324,99336,99378,99418,99423,99429,99455,99463,99465,99469,99484,99490,99493-99494,99537,99544,99570,99575,99629-99630,99671,99692
+/llvm/trunk:98602,98604,98612,98615-98616,98675,98686,98743-98744,98773,98778,98780,98810,98835,98839,98845,98855,98862,98881,98920,98977,99032-99033,99043,99223,99263,99282-99284,99306,99319-99321,99324,99336,99378,99418,99423,99429,99455,99463,99465,99469,99484,99490,99493-99494,99537,99544,99570,99575,99629-99630,99671,99692,99695

Modified: llvm/branches/Apple/Morbo/lib/CodeGen/DwarfEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/DwarfEHPrepare.cpp?rev=99696&r1=99695&r2=99696&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/DwarfEHPrepare.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/DwarfEHPrepare.cpp Fri Mar 26 20:23:32 2010
@@ -86,7 +86,7 @@
     /// CleanupSelectors - Any remaining eh.selector intrinsic calls which still
     /// use the ".llvm.eh.catch.all.value" call need to convert to using it's
     /// initializer instead.
-    void CleanupSelectors();
+    bool CleanupSelectors();
 
     /// HandleURoRInvokes - Handle invokes of "_Unwind_Resume_or_Rethrow"
     /// calls. The "unwind" part of these invokes jump to a landing pad within
@@ -220,7 +220,8 @@
 /// CleanupSelectors - Any remaining eh.selector intrinsic calls which still use
 /// the ".llvm.eh.catch.all.value" call need to convert to using it's
 /// initializer instead.
-void DwarfEHPrepare::CleanupSelectors() {
+bool DwarfEHPrepare::CleanupSelectors() {
+  bool Changed = false;
   for (Value::use_iterator
          I = SelectorIntrinsic->use_begin(),
          E = SelectorIntrinsic->use_end(); I != E; ++I) {
@@ -232,7 +233,10 @@
     GlobalVariable *GV = dyn_cast<GlobalVariable>(Sel->getOperand(OpIdx));
     if (GV != EHCatchAllValue) continue;
     Sel->setOperand(OpIdx, EHCatchAllValue->getInitializer());
+    Changed = true;
   }
+
+  return Changed;
 }
 
 /// HandleURoRInvokes - Handle invokes of "_Unwind_Resume_or_Rethrow" calls. The
@@ -254,19 +258,13 @@
 
   if (!URoR) {
     URoR = F->getParent()->getFunction("_Unwind_Resume_or_Rethrow");
-    if (!URoR) {
-      CleanupSelectors();
-      return false;
-    }
+    if (!URoR) return CleanupSelectors();
   }
 
   if (!ExceptionValueIntrinsic) {
     ExceptionValueIntrinsic =
       Intrinsic::getDeclaration(F->getParent(), Intrinsic::eh_exception);
-    if (!ExceptionValueIntrinsic) {
-      CleanupSelectors();
-      return false;
-    }
+    if (!ExceptionValueIntrinsic) return CleanupSelectors();
   }
 
   bool Changed = false;
@@ -337,7 +335,7 @@
     }
   }
 
-  CleanupSelectors();
+  Changed |= CleanupSelectors();
   return Changed;
 }
 





More information about the llvm-branch-commits mailing list