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 4
- From: Devang Patel <dpatel at apple dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 26 Jan 2004 11:09:01 -0800
- Subject: [PATCH] [C++/DWARF] Add 'using' support - take 4
[Ref http://gcc.gnu.org/ml/gcc-patches/2004-01/msg02516.html ]
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
ChangeLog is same as previous.
OK for mainline?
Thank you,
-
Devang
2003-01-26 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.take4.diff
Description: Binary data