[llvm-commits] [llvm-gcc-4.2] r79349 - in /llvm-gcc-4.2/trunk/gcc: config/darwin.h except.c unwind-dw2.c
Duncan Sands
baldrick at free.fr
Tue Aug 18 10:21:21 PDT 2009
Author: baldrick
Date: Tue Aug 18 12:21:21 2009
New Revision: 79349
URL: http://llvm.org/viewvc/llvm-project?rev=79349&view=rev
Log:
Starting from gcc-4.3, mainline gcc also uses_Unwind_GetCFA rather
than _Unwind_GetIP in uw_identify_context. That means all machines
where the system libgcc comes from gcc-4.3 or later are like darwin:
for exception handing to work properly, llvm-gcc needs to use
_Unwind_Resume_or_Rethrow rather than the less general (but more
efficient) _Unwind_Resume. At the same time, there is no longer any
point in having llvm-gcc's version of uw_identify_context make use
of _Unwind_GetIP on non-darwin machines. This fixes PR2998.
Modified:
llvm-gcc-4.2/trunk/gcc/config/darwin.h
llvm-gcc-4.2/trunk/gcc/except.c
llvm-gcc-4.2/trunk/gcc/unwind-dw2.c
Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.h?rev=79349&r1=79348&r2=79349&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.h Tue Aug 18 12:21:21 2009
@@ -1493,9 +1493,6 @@
argvec.push_back ("--relocation-model=static")
#endif /* !TARGET_386 && !TARGET_ARM */
-/* On Darwin _Unwind_Resume is sensitive to the dynamic stack layout; we
- use _Unwind_Resume_or_Rethrow instead. */
-#define LLVM_STACKSENSITIVE_UNWIND_RESUME 1
#endif
/* LLVM LOCAL end */
Modified: llvm-gcc-4.2/trunk/gcc/except.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/except.c?rev=79349&r1=79348&r2=79349&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/except.c (original)
+++ llvm-gcc-4.2/trunk/gcc/except.c Tue Aug 18 12:21:21 2009
@@ -4094,11 +4094,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/trunk/gcc/unwind-dw2.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/unwind-dw2.c?rev=79349&r1=79348&r2=79349&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/unwind-dw2.c (original)
+++ llvm-gcc-4.2/trunk/gcc/unwind-dw2.c Tue Aug 18 12:21:21 2009
@@ -1511,15 +1511,8 @@
static inline _Unwind_Ptr
uw_identify_context (struct _Unwind_Context *context)
{
-/* LLVM LOCAL begin
- This change is needed to match Apple's installed libgcc. */
-#ifdef LLVM_STACKSENSITIVE_UNWIND_RESUME
/* APPLE LOCAL libgcc 6148462 */
return _Unwind_GetCFA (context);
-#else
- return _Unwind_GetIP (context);
-#endif
-/* LLVM LOCAL end */
}
More information about the llvm-commits
mailing list