aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2011-05-27 17:43:44 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2011-05-27 17:43:44 +0000
commit38e01f9ec96801f325e382746ba2d424adea5eee (patch)
tree308837cc489c3a37ca81ae52d342d7b9bd43b7c7 /gcc/cp/name-lookup.c
parente330aa5b3568877fb26267fa0f277de320821b14 (diff)
downloadgcc-38e01f9ec96801f325e382746ba2d424adea5eee.zip
gcc-38e01f9ec96801f325e382746ba2d424adea5eee.tar.gz
gcc-38e01f9ec96801f325e382746ba2d424adea5eee.tar.bz2
move TS_STATEMENT_LIST to be a substructure of TS_TYPED
move TS_STATEMENT_LIST to be a substructure of TS_TYPED gcc/ * c-decl.c (c_push_function_context): Copy the current statement list stack. (add_stmt): Check building_stmt_list_p and push_stmt if necessary. (finish_struct): Call building_stmt_list_p instead of checking cur_stmt_list. * c-parser.c (c_parser_postfix_expression): Likewise. * c-typeck.c (c_end_compound_stmt): Likewise. * print-tree.c (print_node) [STATEMENT_LIST]: Don't print TREE_CHAIN. * tree-iterator.c (stmt_list_cache): Change to a VEC. (alloc_stmt_list): Adjust for stmt_list_cache's new type. (free_stmt_list): Likewise. * tree.h (struct tree_statement_list): Include typed_tree instead of tree_common. * tree.c (initialize_tree_contains_struct): Mark TS_STATEMENT_LIST as TS_TYPED instead of TS_COMMON. gcc/c-family/ * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC. (stmt_list_stack): Define. (cur_stmt_list): Adjust for new type of x_cur_stmt_list. * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise. gcc/cp/ * cp-tree.h (building_stmt_tree): Delete. * decl.c (save_function_data): Tweak initializer for x_cur_stmt_list. (build_aggr_init_full_exprs): Call building_stmt_list_p instead of building_stmt_tree. (initialize_local_var): Likewise. (finish_function): Likewise. * decl2.c (finish_anon_union): Likewise. * init.c (begin_init_stmts): Likewise. (finish_init_stmts): Likewise. (expand_aggr_init_1): Likewise. * name-lookup.c (do_local_using_decl): Likewise. (do_namespace_alias): Likewise. (do_using_directive): Likewise. (cp_emit_debug_info_for_using): Likewise. * semantics.c (add_stmt): Assert that stmt_list_stack is non-empty. From-SVN: r174343
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 3d07ff6..0e762fd 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -2475,7 +2475,7 @@ do_local_using_decl (tree decl, tree scope, tree name)
if (decl == NULL_TREE)
return;
- if (building_stmt_tree ()
+ if (building_stmt_list_p ()
&& at_function_scope_p ())
add_decl_expr (decl);
@@ -3570,7 +3570,7 @@ do_namespace_alias (tree alias, tree name_space)
pushdecl (alias);
/* Emit debug info for namespace alias. */
- if (!building_stmt_tree ())
+ if (!building_stmt_list_p ())
(*debug_hooks->global_decl) (alias);
}
@@ -3718,7 +3718,7 @@ do_using_directive (tree name_space)
gcc_assert (TREE_CODE (name_space) == NAMESPACE_DECL);
- if (building_stmt_tree ())
+ if (building_stmt_list_p ())
add_stmt (build_stmt (input_location, USING_STMT, name_space));
name_space = ORIGINAL_NAMESPACE (name_space);
@@ -5890,7 +5890,7 @@ cp_emit_debug_info_for_using (tree t, tree context)
for (t = OVL_CURRENT (t); t; t = OVL_NEXT (t))
if (TREE_CODE (t) != TEMPLATE_DECL)
{
- if (building_stmt_tree ())
+ if (building_stmt_list_p ())
add_stmt (build_stmt (input_location, USING_STMT, t));
else
(*debug_hooks->imported_module_or_decl) (t, NULL_TREE, context, false);