This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] [C++/DWARF] Add 'using' support - take 3
- From: Devang Patel <dpatel at apple dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 22 Jan 2004 16:13:29 -0800
- Subject: [PATCH] [C++/DWARF] Add 'using' support - take 3
Hi All,
[ Ref: http://gcc.gnu.org/ml/gcc-patches/2003-12/msg01778.html]
This revision includes changes to accommodate inputs I received for
previous patch.
List of changes:
- Uses 'processing_template_decl' to filter templates
- Use current scope as context for using-directive instead of current
namespace
- Instead of emitting abstract or half backed definition now
force_decl_die()
forces declaration dies for functions and variables. Related changes
are
1) Remove checks that allowed definition die reuse
2) Selectively remove child dies while using subprogram declaration
die as
definition die
3) Equate declaration die to line number
- gen_subprogram_die() does not return new die
Bootstrapped and tested on i686-pc-linux-gnu
These three test suite runs do not reveal any new regression:
- gcc test suite
- libstdc++ test suite
- gdb test suite using carlton_dictionary-branch
OK for mainline?
Thank you,
-
Devang
2003-01-22 Devang Patel <dpatel@apple.com>
* Makefile.in (dwarf2out.o): Depend on input.h
* dbxout.c (dbx_debug_hooks): Add new empty hook for
imported_module_or_decl.
(xcoff_debug_hooks): Same.
* sdbout.c (sdb_debug_hooks): Same.
* vmsdbgout.c (vmsdbg_debug_hooks): Same.
* debug.c (do_nothing_debug_hooks): Same.
(debug_nothing_tree_tree_enum): New function.
* debug.h (gcc_debug_hooks): New hook, imported_module_or_decl.
(dbg_module_or_decl): New enum.
* dwarf2out.c: Include input.h.
(dwarf2_debug_hooks): Add new hook for imported_module_or_decl.
(remove_child_TAG): New function.
(dwarf_tag_name): Handle DW_TAG_imported_module.
(gen_subprogram_die): Equate decl number to declaration die. Do
not
remove all children dies while reusing declaration die for
definition.
Instead, selectively remove only formal parameters.
(gen_variable_die): Equate variable decl to declaration die.
(gen_field_die): Equate field decl to line number.
(force_namespace_die): Replace it with ...
(force_decl_die): ... this.
(force_type_die): New function.
(setup_namespace_context): Replace use of force_namespace_die()
with
force_decl_die().
(gen_namespace_die): Same.
(dwarf2out_imported_module_or_decl): New function.
testsuite:
g++.dg/debug/namespace1.C: New test.
cp:
* name-lookup.c: Include "debug.h"
(do_namespace_alias): Invoke debug_hooks to emit debug info
for namespace alias.
(do_local_using_decl): Invoke debug_hooks to emit debug info
for using decl.
(do_class_using_decl): Same.
(do_toplevel_using_decl): Same.
(do_using_directive): Same.
(cp_emit_debug_info_for_using): New function.
* Make-lang.in (cp/parser.o): Depend on debug.h
(cp/name-lookup.o): Same.
Attachment:
dwarf_using.take3.diff
Description: Binary data