Apply Eric's patch for <rdar://problem/7151726>.

llvm-svn: 81440
diff --git a/llvm-gcc-4.2/gcc/except.c b/llvm-gcc-4.2/gcc/except.c
index af7c05c..fa97fe7 100644
--- a/llvm-gcc-4.2/gcc/except.c
+++ b/llvm-gcc-4.2/gcc/except.c
@@ -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));
diff --git a/llvm-gcc-4.2/gcc/llvm-convert.cpp b/llvm-gcc-4.2/gcc/llvm-convert.cpp
index d06a27c..6101db1 100644
--- a/llvm-gcc-4.2/gcc/llvm-convert.cpp
+++ b/llvm-gcc-4.2/gcc/llvm-convert.cpp
@@ -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();
   }
 }