objc-act.c (handle_impent): Use assemble_variable to emit __objc_class_name_*.
authorJakub Jelinek <jakub@redhat.com>
Sun, 6 Jan 2002 20:21:03 +0000 (21:21 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 6 Jan 2002 20:21:03 +0000 (21:21 +0100)
* objc/objc-act.c (handle_impent): Use assemble_variable to emit
__objc_class_name_*.

From-SVN: r48584

gcc/ChangeLog
gcc/objc/objc-act.c

index 5983ff6dad1d0776abaa0554a01fc62262be3705..dd3c5cd3f3eea73f56ed4adbc9f2deb36b13f6da 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-06  Jakub Jelinek  <jakub@redhat.com>
+
+       * objc/objc-act.c (handle_impent): Use assemble_variable to emit
+       __objc_class_name_*.
+
 2002-01-06  Craig Rodrigues  <rodrigc@gcc.gnu.org>
 
        * doc/install.texi (sparcv9-*-solaris2*): Add documentation.
index 9d4469b27f5f1338a84fa2b21386dba91ef41739..5538a21cb78032673ac01949ad4f11e84abe5b76 100644 (file)
@@ -8357,14 +8357,23 @@ handle_impent (impent)
       ASM_DECLARE_CLASS_REFERENCE (asm_out_file, string);
       return;
     }
+  else
 #endif
+    {
+      tree decl, init;
 
-  /* (Should this be a routine in varasm.c?) */
-  readonly_data_section ();
-  assemble_global (string);
-  assemble_align (UNITS_PER_WORD);
-  assemble_label (string);
-  assemble_zeros (UNITS_PER_WORD);
+      init = build_int_2 (0, 0);
+      TREE_TYPE (init) = type_for_size (BITS_PER_WORD, 1);
+      decl = build_decl (VAR_DECL, get_identifier (string), TREE_TYPE (init));
+      TREE_PUBLIC (decl) = 1;
+      TREE_READONLY (decl) = 1;
+      TREE_USED (decl) = 1;
+      TREE_CONSTANT (decl) = 1;
+      DECL_CONTEXT (decl) = 0;
+      DECL_ARTIFICIAL (decl) = 1;
+      DECL_INITIAL (decl) = init;
+      assemble_variable (decl, 1, 0, 0);
+    }
 }
 \f
 static void