diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-01 01:32:10 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-01 01:32:10 +0000 |
commit | 1cff51e380fef6a08d3149143cd57f2152f83380 (patch) | |
tree | 9a5131e1306d24a045845b0ecb18a40958398215 | |
parent | 9dd3a4f6f2a79de2ef525fc228a35f9d527d7324 (diff) | |
download | gcc-1cff51e380fef6a08d3149143cd57f2152f83380.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103713 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/objc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 70 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/image-info.m | 2 |
4 files changed, 26 insertions, 60 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index fdb8c57958d..a66a772546f 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,5 +1,13 @@ 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 * objc-act.c (next_sjlj_build_try_catch_finally): Set TREE_SIDE_EFFECTS on catch_seq after building it. diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 7d3fb2672fb..f5a8441b312 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 35176b6d09e..515ea5a026a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/objc.dg/image-info.m b/gcc/testsuite/objc.dg/image-info.m index 87f14779295..3ffe81438d4 100644 --- a/gcc/testsuite/objc.dg/image-info.m +++ b/gcc/testsuite/objc.dg/image-info.m @@ -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" } } */ |