[llvm-branch-commits] [llvm-gcc-branch] r81440 - in /llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc: except.c llvm-convert.cpp

Bill Wendling isanbard at gmail.com
Thu Sep 10 02:06:12 PDT 2009


Author: void
Date: Thu Sep 10 04:06:11 2009
New Revision: 81440

URL: http://llvm.org/viewvc/llvm-project?rev=81440&view=rev
Log:
Apply Eric's patch for <rdar://problem/7151726>.

Modified:
    llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/except.c
    llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/except.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/except.c?rev=81440&r1=81439&r2=81440&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/except.c (original)
+++ llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/except.c Thu Sep 10 04:06:11 2009
@@ -4085,11 +4085,7 @@
      and even requires additional instructions on some targets. */
   const char *name = USING_SJLJ_EXCEPTIONS ?
                        "_Unwind_SjLj_Resume"
-#ifdef LLVM_STACKSENSITIVE_UNWIND_RESUME
-                       : "_Unwind_Resume_or_Rethrow";
-#else
                        : "_Unwind_Resume";
-#endif
   tree decl = build_decl (FUNCTION_DECL, get_identifier (name),
                           build_function_type_list (void_type_node,
                                                     ptr_type_node, NULL_TREE));

Modified: llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp?rev=81440&r1=81439&r2=81440&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp Thu Sep 10 04:06:11 2009
@@ -1905,30 +1905,10 @@
             Args.push_back(Emit(TType, 0));
           }
         }
-      }
-    }
-
-    if (can_throw_external_1(i, false)) {
-      // Some exceptions from this region may not be caught by any handler.
-      // Since invokes are required to branch to the unwind label no matter
-      // what exception is being unwound, append a catch-all.
-
-      // The representation of a catch-all is language specific.
-      Value *Catch_All;
-      if (!lang_eh_catch_all) {
-        // Use a "cleanup" - this should be good enough for most languages.
-        Catch_All = ConstantInt::get(Type::Int32Ty, 0);
       } else {
-        tree catch_all_type = lang_eh_catch_all();
-        if (catch_all_type == NULL_TREE)
-          // Use a C++ style null catch-all object.
-          Catch_All =
-            Constant::getNullValue(PointerType::getUnqual(Type::Int8Ty));
-        else
-          // This language has a type that catches all others.
-          Catch_All = Emit(catch_all_type, 0);
+	// Cleanup region.
+	Args.push_back(ConstantInt::get(Type::Int32Ty, 0));
       }
-      Args.push_back(Catch_All);
     }
 
     // Emit the selector call.
@@ -2063,11 +2043,7 @@
   if (UnwindBB) {
     CreateExceptionValues();
     EmitBlock(UnwindBB);
-    // Fetch and store exception handler.
-    Value *Arg = Builder.CreateLoad(ExceptionValue, "eh_ptr");
-    assert(llvm_unwind_resume_libfunc && "no unwind resume function!");
-    Builder.CreateCall(DECL_LLVM(llvm_unwind_resume_libfunc), Arg);
-    Builder.CreateUnreachable();
+    Builder.CreateUnwind();
   }
 }
 





More information about the llvm-branch-commits mailing list