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

Bill Wendling isanbard at gmail.com
Fri Sep 18 11:21:59 PDT 2009


Author: void
Date: Fri Sep 18 13:21:59 2009
New Revision: 82238

URL: http://llvm.org/viewvc/llvm-project?rev=82238&view=rev
Log:
Apply candidate patch for <rdar://problem/6824456>.

Modified:
    llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/except.c
    llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-backend.cpp
    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=82238&r1=82237&r2=82238&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 Fri Sep 18 13:21:59 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-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-backend.cpp?rev=82238&r1=82237&r2=82238&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-backend.cpp Fri Sep 18 13:21:59 2009
@@ -1386,10 +1386,7 @@
 #endif
   }
 
-  // No debug info for globals when optimization is on.  While this is
-  // something that would be accurate and useful to a user, it currently
-  // affects some optimizations that, e.g., count uses.
-  if (TheDebugInfo && !optimize) {
+  if (TheDebugInfo) {
     const char *Name = GV->getName().c_str();
     const char LPrefix[] = "\01L_OBJC_";
     const char lPrefix[] = "\01l_OBJC_";

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=82238&r1=82237&r2=82238&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 Fri Sep 18 13:21:59 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