diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-05-05 01:27:06 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-05-04 21:27:06 -0400 |
commit | 2addbe1dca329d6a5c94be60f2512e05787e1fed (patch) | |
tree | 5a18ae7b4648a1141acc035141e7f86ae0c82e17 /gcc/dwarf2out.c | |
parent | 2e14a41b63bb3ac89e91b85e58ae3d0f3e3798c9 (diff) | |
download | gcc-2addbe1dca329d6a5c94be60f2512e05787e1fed.zip gcc-2addbe1dca329d6a5c94be60f2512e05787e1fed.tar.gz gcc-2addbe1dca329d6a5c94be60f2512e05787e1fed.tar.bz2 |
tree.def: Add NAMESPACE_DECL.
* tree.def: Add NAMESPACE_DECL.
* dwarfout.c (type_ok_for_scope): Ignore NAMESPACE_DECLs for now.
* dwarf2out.c (push_decl_scope): Likewise.
(scope_die_for): Likewise.
* tree.c (decl_function_context): Use TREE_CODE_CLASS to determine
how to get next context level.
* cp-tree.def: Remove NAMESPACE_DECL.
* cp/Makefile.in: Add .SUFFIXES.
From-SVN: r19539
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 71f2ec0..e8ba8e3 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -7523,6 +7523,8 @@ push_decl_scope (scope) /* The normal case. */ if (decl_scope_depth == 0 || containing_scope == NULL_TREE + /* Ignore namespaces for the moment. */ + || TREE_CODE (containing_scope) == NAMESPACE_DECL || containing_scope == decl_scope_table[decl_scope_depth - 1].scope) decl_scope_table[decl_scope_depth].previous = decl_scope_depth - 1; else @@ -7541,7 +7543,7 @@ push_decl_scope (scope) decl_scope_depth++; } -/* Return the DIE for the scope the immediately contains this declaration. */ +/* Return the DIE for the scope that immediately contains this declaration. */ static dw_die_ref scope_die_for (t, context_die) @@ -7561,6 +7563,10 @@ scope_die_for (t, context_die) else containing_scope = DECL_CONTEXT (t); + /* Ignore namespaces for the moment. */ + if (containing_scope && TREE_CODE (containing_scope) == NAMESPACE_DECL) + containing_scope = NULL_TREE; + /* Function-local tags and functions get stuck in limbo until they are fixed up by decls_for_scope. */ if (context_die == NULL && containing_scope != NULL_TREE |