[llvm-branch-commits] [llvm-gcc-branch] r77995 - /llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/objc/objc-act.c

Bill Wendling isanbard at gmail.com
Mon Aug 3 14:01:26 PDT 2009


Author: void
Date: Mon Aug  3 16:00:57 2009
New Revision: 77995

URL: http://llvm.org/viewvc/llvm-project?rev=77995&view=rev
Log:
--- Merging r77994 into 'gcc/objc/objc-act.c':
U    gcc/objc/objc-act.c

Wow! This is not good. So, it looks like we needed to generate "i8* null" for
the last argument of an llvm.eh.selector call for the @finally block. Daniel
explained some of the horrid behavior of the exception system. After I recovered
from that nightmare, we determined that ObjC needed to handle the @finally as a
C++ cleanup method. Hence, the "i8* null". This is only needed in 64-bit mode.

Modified:
    llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/objc/objc-act.c

Modified: llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/objc/objc-act.c?rev=77995&r1=77994&r2=77995&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/objc/objc-act.c Mon Aug  3 16:00:57 2009
@@ -8229,6 +8229,19 @@
 
 static struct objc_try_context *cur_try_context;
 
+/* LLVM LOCAL begin 7069718 */
+#ifdef ENABLE_LLVM
+/* Do nothing (return NULL_TREE).  */
+static tree return_null_tree (void);
+
+tree
+return_null_tree (void)
+{
+  return NULL_TREE;
+}
+#endif
+/* LLVM LOCAL end 7069718 */
+
 /* This hook, called via lang_eh_runtime_type, generates a runtime object
    that represents TYPE.  For Objective-C, this is just the class name.  */
 /* ??? Isn't there a class object or some such?  Is it easy to get?  */
@@ -8312,6 +8325,13 @@
       lang_eh_runtime_type = objc_eh_runtime_type;
     }
 #endif
+
+  /* LLVM LOCAL begin 7069718 */
+#ifdef ENABLE_LLVM
+  if (flag_objc_zerocost_exceptions)
+    lang_eh_catch_all = return_null_tree;
+#endif
+  /* LLVM LOCAL end 7069718 */
 }
 
 /* Build an EXC_PTR_EXPR, or the moral equivalent.  In the case of Darwin,





More information about the llvm-branch-commits mailing list