[llvm-commits] [llvm-gcc-4.2] r77994 - /llvm-gcc-4.2/trunk/gcc/objc/objc-act.c

Bill Wendling isanbard at gmail.com
Mon Aug 3 13:58:13 PDT 2009


Author: void
Date: Mon Aug  3 15:57:57 2009
New Revision: 77994

URL: http://llvm.org/viewvc/llvm-project?rev=77994&view=rev
Log:
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/trunk/gcc/objc/objc-act.c

Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/objc/objc-act.c?rev=77994&r1=77993&r2=77994&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Mon Aug  3 15:57: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-commits mailing list