Commit 04885a24 by Andrew Pinski Committed by Andrew Pinski

re PR objc/23306 ([unit-at-a-time] objc exceptions (GNU runtime) don't work with unit-at-a-time)

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
parent 0fd662ee
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.
......
......@@ -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;
......
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
......@@ -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" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment