re PR objc/23306 ([unit-at-a-time] objc exceptions (GNU runtime) don't work with...
authorAndrew Pinski <pinskia@physics.uc.edu>
Thu, 1 Sep 2005 01:32:10 +0000 (01:32 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Thu, 1 Sep 2005 01:32:10 +0000 (18:32 -0700)
2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/23306
        * objc-act.c (generate_strings): Remove and move code to
        finish decl to ...
        (add_objc_string): here when creating a new string decl.
        (finish_objc): Don't call generate_strings.

2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/23306
        * objc.dg/image-info.m: Remove "objc_module_info" check part of the
        scan-assmbler.

From-SVN: r103713

gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/testsuite/ChangeLog
gcc/testsuite/objc.dg/image-info.m

index fdb8c57958d42e54a3b74c16986d306273afa737..a66a772546f31861abb4bbd914c33b108e9cf96b 100644 (file)
@@ -1,3 +1,11 @@
+2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR objc/23306
+       * objc-act.c (generate_strings): Remove and move code to
+       finish decl to ...
+       (add_objc_string): here when creating a new string decl.
+       (finish_objc): Don't call generate_strings.
+
 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR objc/23381
index 7d3fb2672fbcb5d5e68fe939210886c31f85564c..f5a8441b3120a8215ae918185b94a3352c29e15b 100644 (file)
@@ -2448,60 +2448,6 @@ generate_static_references (void)
   finish_var_decl (static_instances_decl, expr);
 }
 
-/* Output all strings.  */
-
-static void
-generate_strings (void)
-{
-  tree chain, string_expr;
-  tree string, decl, type;
-
-  for (chain = class_names_chain; chain; chain = TREE_CHAIN (chain))
-    {
-      string = TREE_VALUE (chain);
-      decl = TREE_PURPOSE (chain);
-      type = build_array_type
-            (char_type_node,
-             build_index_type
-             (build_int_cst (NULL_TREE, 
-                             IDENTIFIER_LENGTH (string))));
-      decl = start_var_decl (type, IDENTIFIER_POINTER (DECL_NAME (decl)));
-      string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1,
-                                    IDENTIFIER_POINTER (string));
-      finish_var_decl (decl, string_expr);
-    }
-
-  for (chain = meth_var_names_chain; chain; chain = TREE_CHAIN (chain))
-    {
-      string = TREE_VALUE (chain);
-      decl = TREE_PURPOSE (chain);
-      type = build_array_type
-            (char_type_node,
-             build_index_type
-             (build_int_cst (NULL_TREE,
-                             IDENTIFIER_LENGTH (string))));
-      decl = start_var_decl (type, IDENTIFIER_POINTER (DECL_NAME (decl)));
-      string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1,
-                                    IDENTIFIER_POINTER (string));
-      finish_var_decl (decl, string_expr);
-    }
-
-  for (chain = meth_var_types_chain; chain; chain = TREE_CHAIN (chain))
-    {
-      string = TREE_VALUE (chain);
-      decl = TREE_PURPOSE (chain);
-      type = build_array_type
-            (char_type_node,
-             build_index_type
-             (build_int_cst (NULL_TREE,
-                             IDENTIFIER_LENGTH (string))));
-      decl = start_var_decl (type, IDENTIFIER_POINTER (DECL_NAME (decl)));
-      string_expr = my_build_string (IDENTIFIER_LENGTH (string) + 1,
-                                    IDENTIFIER_POINTER (string));
-      finish_var_decl (decl, string_expr);
-    }
-}
-
 static GTY(()) int selector_reference_idx;
 
 static tree
@@ -2820,7 +2766,7 @@ objc_get_class_reference (tree ident)
 static tree
 add_objc_string (tree ident, enum string_section section)
 {
-  tree *chain, decl;
+  tree *chain, decl, type, string_expr;
 
   if (section == class_names)
     chain = &class_names_chain;
@@ -2841,6 +2787,16 @@ add_objc_string (tree ident, enum string_section section)
     }
 
   decl = build_objc_string_decl (section);
+  
+  type = build_array_type
+        (char_type_node,
+         build_index_type
+         (build_int_cst (NULL_TREE, 
+                         IDENTIFIER_LENGTH (ident))));
+  decl = start_var_decl (type, IDENTIFIER_POINTER (DECL_NAME (decl)));
+  string_expr = my_build_string (IDENTIFIER_LENGTH (ident) + 1,
+                                IDENTIFIER_POINTER (ident));
+  finish_var_decl (decl, string_expr);
 
   *chain = tree_cons (decl, ident, NULL_TREE);
 
@@ -9226,10 +9182,6 @@ finish_objc (void)
   for (impent = imp_list; impent; impent = impent->next)
     handle_impent (impent);
 
-  /* Dump the string table last.  */
-
-  generate_strings ();
-
   if (warn_selector)
     {
       int slot;
index 35176b6d09eba14f80ce273a1e77583b343c9a0c..515ea5a026a640a8d6eb2463ad140515dfb38178 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR objc/23306
+       * objc.dg/image-info.m: Remove "objc_module_info" check part of the
+       scan-assmbler.
+
 2005-08-31  J"orn Rennecke <joern.rennecke@st.com>
 
        PR target/21255
index 87f147792956346b775cd2baf89fa37cdbbcc93e..3ffe81438d420951e031600d4e9d6a5cb3c050d9 100644 (file)
@@ -35,4 +35,4 @@ extern void abort(void);
 }
 @end
 
-/* { dg-final { scan-assembler "\t.section __OBJC, __image_info.*\n\t.align.*\nL_OBJC_IMAGE_INFO.*:\n\t.long\t0\n\t.long\t1\n\t.objc_module_info\n" } } */
+/* { dg-final { scan-assembler "\t.section __OBJC, __image_info.*\n\t.align.*\nL_OBJC_IMAGE_INFO.*:\n\t.long\t0\n\t.long\t1" } } */