aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2004-07-20 23:20:08 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2004-07-20 23:20:08 +0000
commit406d77a4bb10d5b60a9a061f59405e0aa850ea2b (patch)
tree60f27536fd4be89c4b8a14b5f5c8d884d5f061bd /gcc/cp/tree.c
parent3e95a7cbf534c8f738a3267773f03dfe80d69484 (diff)
downloadgcc-406d77a4bb10d5b60a9a061f59405e0aa850ea2b.zip
gcc-406d77a4bb10d5b60a9a061f59405e0aa850ea2b.tar.gz
gcc-406d77a4bb10d5b60a9a061f59405e0aa850ea2b.tar.bz2
cp-tree.def (TINST_LEVEL): Make it an 'x' node.
* cp-tree.def (TINST_LEVEL): Make it an 'x' node. * cp-tree.h (tinst_level_t): New tree type. (union lang_tree_node): Handle it. (TINST_LOCATION): New accessor macro. (make_tinst_level): New prototype. * cp-lang.c (cp_tree_size): Handle TINST_LEVEL. * decl.c (cp_tree_node_structure): Likewise. * error.c (print_instantiation_full_context): Use TINST_LOCATION. (print_instantiation_partial_context): Likewise. * pt.c (pop_tinst_level): Likewise. (push_tinst_level): Use make_tinst_level. * tree.c (make_tinst_level): New function. (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node. From-SVN: r84977
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 918849d..0972ad2 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1900,6 +1900,17 @@ handle_init_priority_attribute (tree* node,
}
}
+/* Return a new TINST_LEVEL for DECL at location locus. */
+tree
+make_tinst_level (tree decl, location_t locus)
+{
+ tree tinst_level = make_node (TINST_LEVEL);
+ TREE_CHAIN (tinst_level) = NULL_TREE;
+ TINST_DECL (tinst_level) = decl;
+ TINST_LOCATION (tinst_level) = locus;
+ return tinst_level;
+}
+
/* Return a new PTRMEM_CST of the indicated TYPE. The MEMBER is the
thing pointed to by the constant. */
@@ -1973,6 +1984,11 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func,
*walk_subtrees_p = 0;
break;
+ case TINST_LEVEL:
+ WALK_SUBTREE (TINST_DECL (*tp));
+ *walk_subtrees_p = 0;
+ break;
+
case PTRMEM_CST:
WALK_SUBTREE (TREE_TYPE (*tp));
*walk_subtrees_p = 0;