From a63d78e18413a855742c1d76467b90f455e3ed0e Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 19 Feb 2016 19:55:46 -0200 Subject: support aliases and trampolines in dwarf2 for gcc/ChangeLog * debug.h (struct gcc_debug_hooks): Add aliased_decl and trampoline_decl. * dwarf2out.c (dwarf2out_aliased_decl): New. (dwarf2out_trampoline_decl): New. (dwarf2_debug_hooks): Add them. (dwarf2_name): Skip leading '*' returned by langhook. (dwarf2_lineno_debug_hooks): Add dummies. * debug.c (do_nothing_debug_hooks): Likewise. * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * cgraph.h (cgraph_node::is_lang_trampoline): Declare. * cgraphunit.c: Include demangle.h. (cgraph_node::expand_thunk): Call function_decl debug_hook after assembly expansion. Do not mark thunk as ignored in gimple expansion. (cxx_cdtor_trampoline_p): New. (cgraph_node::is_lang_trampoline): New. (cgraph_node::assemble_thunks_and_aliases): Call the new debug_hooks. (symbol_table::output_weakrefs): Likewise. * varpool.c (varpool_node::assemble_aliases): Likewise. for gcc/cp/ChangeLog * method.c (make_alias_for): Copy DECL_IGNORED_P. for gcc/testsuite/ChangeLog * g++.dg/debug/dwarf2/cdtor-1.C: Adjust linkage_name count. * g++.dg/debug/dwarf2/cdtor-2.C: New. * g++.dg/debug/dwarf2/cdtor-3.C: New. * g++.dg/debug/dwarf2/covariant-1.C: New. * gcc.dg/debug/dwarf2/attr-alias-1.c: New. * gcc.dg/debug/dwarf2/attr-alias-2.c: New. * gcc.dg/debug/dwarf2/attr-weakref-1.c: New. * gcc.dg/debug/dwarf2/attr-weakref-2.c: New. --- gcc/debug.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/debug.c') diff --git a/gcc/debug.c b/gcc/debug.c index 9c2caaea695..c9495c9a27c 100644 --- a/gcc/debug.c +++ b/gcc/debug.c @@ -50,6 +50,8 @@ const struct gcc_debug_hooks do_nothing_debug_hooks = debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */ debug_nothing_tree, /* deferred_inline_function */ debug_nothing_tree, /* outlining_inline_function */ + debug_nothing_tree_tree, /* aliased_decl */ + debug_nothing_tree_tree, /* trampoline_decl */ debug_nothing_rtx_code_label, /* label */ debug_nothing_int, /* handle_pch */ debug_nothing_rtx_insn, /* var_location */ -- cgit v1.2.1