[llvm-commits] [llvm-gcc-4.0] r42566 - /llvm-gcc-4.0/trunk/gcc/objc/objc-act.c

Owen Anderson resistor at mac.com
Tue Oct 2 21:33:13 PDT 2007


Author: resistor
Date: Tue Oct  2 23:33:12 2007
New Revision: 42566

URL: http://llvm.org/viewvc/llvm-project?rev=42566&view=rev
Log:
Revert Bill's last patch to this file.  It was causing a failure building
Qt for Darwin.

Modified:
    llvm-gcc-4.0/trunk/gcc/objc/objc-act.c

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

==============================================================================
--- llvm-gcc-4.0/trunk/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.0/trunk/gcc/objc/objc-act.c Tue Oct  2 23:33:12 2007
@@ -2566,8 +2566,7 @@
 
   /* struct objc_method_list   *optional_instance_methods; */
   if (!optional_instance_meth)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       expr = convert (objc_method_list_ptr, build_unary_op (ADDR_EXPR, 
@@ -2577,8 +2576,7 @@
 
   /* struct objc_method_list   *optional_class_methods; */
   if (!optional_class_meth)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       expr = convert (objc_method_list_ptr, build_unary_op (ADDR_EXPR, 
@@ -2588,8 +2586,7 @@
 
   /* struct objc_prop_list     *instance_properties; */
   if (!instance_prop)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       expr = convert (objc_prop_list_ptr, build_unary_op (ADDR_EXPR, 
@@ -2670,8 +2667,7 @@
 
   /* struct _prop_list_t *properties; */
   if (!property_list)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       expr = convert (objc_prop_list_ptr,
@@ -4978,8 +4974,7 @@
   /* refs = { ..., _OBJC_SELECTOR_TABLE, ... } */
 
   if (flag_next_runtime || ! sel_ref_chain)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     initlist
       = tree_cons (NULL_TREE,
@@ -9239,8 +9234,7 @@
 						 (objc_protocol_template)),
 			     build_unary_op (ADDR_EXPR, refs_decl, 0));
       else
-	/* APPLE LOCAL LLVM - NUL pointer */
-	refs_expr = null_pointer_node;
+	refs_expr = build_int_cst (NULL_TREE, 0);
 
 
       /* APPLE LOCAL begin radar 4585769 - Objective-C 1.0 extensions */
@@ -9310,8 +9304,7 @@
   if (newabi)
     {
       /* 'isa' is NULL in the new ObjC abi */
-      /* APPLE LOCAL LLVM - NUL pointer */
-      expr = null_pointer_node;
+      expr = build_int_cst (NULL_TREE, 0);
     }
   /* APPLE LOCAL end radar 4533974 - ObjC newprotocol - radar 4695109 */
   /* APPLE LOCAL begin radar 4585769 - Objective-C 1.0 extensions */
@@ -9319,8 +9312,7 @@
   else
     {
       if (!objc_protocol_or_opt_ins_meth)
-	/* APPLE LOCAL LLVM - NUL pointer */
-	expr = null_pointer_node;
+	expr = build_int_cst (NULL_TREE, 0);
       else
 	expr = convert (build_pointer_type (objc_protocol_extension_template),
 			build_unary_op (ADDR_EXPR, objc_protocol_or_opt_ins_meth, 0));	
@@ -9334,8 +9326,7 @@
   initlist = tree_cons (NULL_TREE, protocol_list, initlist);
 
   if (!instance_methods)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       /* APPLE LOCAL begin mainline */
@@ -9346,8 +9337,7 @@
     }
 
   if (!class_methods)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       /* APPLE LOCAL begin mainline */
@@ -9362,8 +9352,7 @@
     {
       /* APPLE LOCAL begin radar 4695109 */
       if (!objc_protocol_or_opt_ins_meth)
-	/* APPLE LOCAL LLVM - NUL pointer */
-	initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+	initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
       else
 	{
 	  expr = convert (objc_method_proto_list_ptr,
@@ -9371,8 +9360,7 @@
 	  initlist = tree_cons (NULL_TREE, expr, initlist);
 	}
       if (!opt_cls_meth)
-	/* APPLE LOCAL LLVM - NUL pointer */
-	initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+	initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
       else
 	{
 	  expr = convert (objc_method_proto_list_ptr,
@@ -9381,8 +9369,7 @@
 	}
       /* APPLE LOCAL end radar 4695109 */
       if (!property_list)
-	/* APPLE LOCAL LLVM - NUL pointer */
-	initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+	initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
       else
 	{
 	  expr = convert (objc_prop_list_ptr,
@@ -10402,8 +10389,7 @@
 			ivar);
     else
       /* Unnamed bit-field ivar (yuck).  */
-      /* APPLE LOCAL LLVM - NUL pointer */
-      ivar = tree_cons (NULL_TREE, null_pointer_node, ivar);
+      ivar = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), ivar);
 
     /* Set type */
     encode_field_decl (field_decl,
@@ -10460,8 +10446,7 @@
 			  ivar);
       else
 	/* Unnamed bit-field ivar (yuck).  */
-	/* APPLE LOCAL LLVM - NUL pointer */
-	ivar = tree_cons (NULL_TREE, null_pointer_node, ivar);
+	ivar = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), ivar);
 
       /* Set type.  */
       encode_field_decl (field_decl,
@@ -11157,8 +11142,7 @@
   initlist = tree_cons (NULL_TREE, class_name, initlist);
 
   if (!instance_methods)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       /* APPLE LOCAL begin mainline */
@@ -11168,8 +11152,7 @@
       initlist = tree_cons (NULL_TREE, expr, initlist);
     }
   if (!class_methods)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       /* APPLE LOCAL begin mainline */
@@ -11181,8 +11164,7 @@
 
   /* protocol_list = */
   if (!protocol_list)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+     initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       /* APPLE LOCAL begin radar 4533974 - ObjC new protocol */
@@ -11204,8 +11186,7 @@
   /* APPLE LOCAL begin C* property metadata (Radar 4498373) */
   /* struct _objc_property_list *instance_properties; */
   if (!property_list)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       expr = convert (objc_prop_list_ptr,
@@ -11272,8 +11253,7 @@
 
   /* objc_ivar_list = */
   if (!ivar_list)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       /* APPLE LOCAL begin mainline */
@@ -11285,8 +11265,7 @@
 
   /* objc_method_list = */
   if (!dispatch_table)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       /* APPLE LOCAL begin mainline */
@@ -11298,27 +11277,22 @@
 
   if (flag_next_runtime)
     /* method_cache = */
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       /* dtable = */
-      /* APPLE LOCAL LLVM - NUL pointer */
-      initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+      initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
 
       /* subclass_list = */
-      /* APPLE LOCAL LLVM - NUL pointer */
-      initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+      initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
 
       /* sibling_class = */
-      /* APPLE LOCAL LLVM - NUL pointer */
-      initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+      initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
     }
 
   /* protocol_list = */
   if (! protocol_list)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       expr = convert (build_pointer_type
@@ -11333,21 +11307,18 @@
     {
       /* const char *ivar_layout; */
       if (IS_CLS_META (status)) /* Meta Class ? */
-	/* APPLE LOCAL LLVM - NUL pointer */
-	initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+	initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
       else
 	{
 	  tree ivar_layout = objc_build_ivar_layout (true);
 	  if (!ivar_layout)
-	    /* APPLE LOCAL LLVM - NUL pointer */
-	    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+	    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
 	  else
 	    initlist = tree_cons (NULL_TREE, ivar_layout, initlist);
 	}
       /* struct _objc_class_ext *ext; */
       if (!objc_class_ext)
-	/* APPLE LOCAL LLVM - NUL pointer */
-        initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+        initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
       else
 	{
 	  expr = convert (build_pointer_type (objc_class_ext_template), 
@@ -11357,8 +11328,7 @@
     }
   else
     /* gc_object_type = NULL */
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   /* APPLE LOCAL end radar 4585769 - Objective-C 1.0 extensions */
 
   return objc_build_constructor (type, nreverse (initlist));
@@ -11520,15 +11490,13 @@
   if (cache)
     initlist = tree_cons (NULL_TREE, cache, initlist);
   else
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
 
   /* vtable */
   if (vtable)
     initlist = tree_cons (NULL_TREE, vtable, initlist);
   else
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
 
   /* ro */
   initlist = tree_cons (NULL_TREE, ro, initlist);
@@ -11572,8 +11540,7 @@
   /* APPLE LOCAL begin radar 4695101 */
   /* ivarLayout */
   if (!ivarLayout)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     initlist = tree_cons (NULL_TREE, ivarLayout, initlist);
   /* APPLE LOCAL end radar 4695101 */
@@ -11583,8 +11550,7 @@
 
   /* baseMethods */
   if (!baseMethods)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       expr = convert (objc_method_list_ptr,
@@ -11594,34 +11560,31 @@
 
   /* baseProtocols */
   if (!baseProtocols)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       tree protocol_list_t_p = build_pointer_type (
 		               xref_tag (RECORD_TYPE, 
 			                 get_identifier (UTAG_V2_PROTOCOL_LIST)));
       expr = convert (protocol_list_t_p,
-		      build_unary_op (ADDR_EXPR, baseProtocols, 0));
+                      build_unary_op (ADDR_EXPR, baseProtocols, 0));
       initlist = tree_cons (NULL_TREE, expr, initlist);
     }
 
   /* ivars */
   if (!ivars)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       expr = convert (objc_v2_ivar_list_ptr,
-		      build_unary_op (ADDR_EXPR, ivars, 0));
+                      build_unary_op (ADDR_EXPR, ivars, 0));
       initlist = tree_cons (NULL_TREE, expr, initlist);
     }
 
   /* APPLE LOCAL begin radar 4695101 */
   /* weakIvarLayout */
   if (!weakIvarLayout)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     initlist = tree_cons (NULL_TREE, weakIvarLayout, initlist);
   /* APPLE LOCAL end radar 4695101 */
@@ -11629,12 +11592,11 @@
   /* APPLE LOCAL begin C* property metadata (Radar 4498373) */
   /* property list */
   if (!property_list)
-    /* APPLE LOCAL LLVM - NUL pointer */
-    initlist = tree_cons (NULL_TREE, null_pointer_node, initlist);
+    initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
   else
     {
       expr = convert (objc_prop_list_ptr,
-		      build_unary_op (ADDR_EXPR, property_list, 0));
+                      build_unary_op (ADDR_EXPR, property_list, 0));
       initlist = tree_cons (NULL_TREE, expr, initlist);
     }
   /* APPLE LOCAL end C* property metadata (Radar 4498373) */
@@ -11892,8 +11854,7 @@
       /* root class.  */
       root_expr = build_unary_op (ADDR_EXPR, metaclass_decl, 0);
       metaclass_superclass_expr = build_unary_op (ADDR_EXPR, class_decl, 0);
-      /* APPLE LOCAL LLVM - NUL pointer */
-      class_superclass_expr = null_pointer_node;
+      class_superclass_expr = build_int_cst (NULL_TREE, 0);
       flags |= 0x2; /* CLS_ROOT: it is also a root meta class */
     }
 
@@ -12082,8 +12043,7 @@
       super_expr = build_c_cast (cast_type, super_expr); /* cast! */
     }
   else
-    /* APPLE LOCAL LLVM - NUL pointer */
-    super_expr = null_pointer_node;
+    super_expr = build_int_cst (NULL_TREE, 0);
 
   root_expr = add_objc_string (my_root_id, class_names);
   root_expr = build_c_cast (cast_type, root_expr); /* cast! */
@@ -13343,8 +13303,7 @@
 	refs_expr = convert (build_pointer_type (objc_v2_protocol_template),
 			     build_unary_op (ADDR_EXPR, refs_decl, 0));
       else
-	/* APPLE LOCAL LLVM - NUL pointer */
-	refs_expr = null_pointer_node;
+	refs_expr = build_int_cst (NULL_TREE, 0);
 
       /* APPLE LOCAL begin radar 4695101 */
       /* Build table of list of properties for this protocol. */





More information about the llvm-commits mailing list