summaryrefslogtreecommitdiff
path: root/gcc/tree.def
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-05 21:29:32 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-05 21:29:32 +0000
commit5d8a39b7a23e73be46f1960250792bbc239d6533 (patch)
treed5227fd86e64dffe3a143d3c68ad3f1e06dab6a5 /gcc/tree.def
parent02ceaa6d6f78058dd79c3f745b96aaad5e554c00 (diff)
downloadgcc-5d8a39b7a23e73be46f1960250792bbc239d6533.tar.gz
2008-09-30 Dodji Seketeli <dodji@redhat.com>
gcc/ChangeLog: PR c++/37410 * dwarf2out.c (dwarf2out_imported_module_or_decl): Split this function in two, making it call a new and reusable dwarf2out_imported_module_or_decl() that takes the containing BLOCK of the declaration in argument. (dwarf2out_imported_module_or_decl_real): New function. (decls_for_scope, gen_decl_die, dwarf2out_decl): Take IMPORTED_DECL in account. * tree.def: Added IMPORTED_DECL node type. * tree.h: Added accessors for IMPORTED_DECL nodes. * tree.c (init_ttree): Initialise IMPORTED_DECL node type. gcc/cp/ChangeLog: PR c++/37410 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT make sure an IMPORTED_DECL node is added to the BLOCK_VARS list of the innermost containing BLOCK. gcc/testsuite/ChangeLog: PR c++/37410 * g++.dg/debug/dwarf2/imported-module.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140895 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.def')
-rw-r--r--gcc/tree.def11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index ef103cdba50..bde59b7016c 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -371,6 +371,17 @@ DEFTREECODE (MEMORY_PARTITION_TAG, "memory_partition_tag", tcc_declaration, 0)
_DECLs, providing a hierarchy of names. */
DEFTREECODE (NAMESPACE_DECL, "namespace_decl", tcc_declaration, 0)
+/* A declaration import.
+ The C++ FE uses this to represent a using-directive; eg:
+ "using namespace foo".
+ But it could be used to represent any declaration import construct.
+ Whenever a declaration import appears in a lexical block, the BLOCK node
+ representing that lexical block in GIMPLE will contain an IMPORTED_DECL
+ node, linked via BLOCK_VARS accessor of the said BLOCK.
+ For a given NODE which code is IMPORTED_DECL,
+ IMPORTED_DECL_ASSOCIATED_DECL (NODE) accesses the imported declaration. */
+DEFTREECODE (IMPORTED_DECL, "imported_decl", tcc_declaration, 0)
+
/* A translation unit. This is not technically a declaration, since it
can't be looked up, but it's close enough. */
DEFTREECODE (TRANSLATION_UNIT_DECL, "translation_unit_decl",\