summaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-11 12:40:10 +0000
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-11 12:40:10 +0000
commitf202382313457c1b22855b427ba678d9a1b5c2a2 (patch)
treef7c9d03a32db11d1b9f07488e40eac40beba11a8 /gcc/cp/decl.c
parent88fc652a75fdacdb80d1bd4a80bc5c79cfbd66f0 (diff)
downloadgcc-f202382313457c1b22855b427ba678d9a1b5c2a2.tar.gz
Restore DW_AT_abstract_origin for cross-unit call sites
PR debug/66503 gcc/ChangeLog: * debug.h (struct gcc_debug_hooks): Add a register_main_translation_unit hook. * debug.c (do_nothing_debug_hooks): Provide a function for this new hook. * dbxout.c (dbx_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * dwarf2out.c (main_translation_unit): New global variable. (dwarf2out_register_main_translation_unit): New function implementing the new hook. (dwarf2_debug_hooks): Assign dwarf2out_register_main_translation_unit to this new hook. (dwarf2out_init): Associate any main translation unit to comp_unit_die (). * c/c-decl.c (pop_scope): Register the main translation unit through the new debug hook. * cp/decl.c (cxx_init_decl_processing): Likewise. gcc/ada/ChangeLog: * gcc-interface/utils.c (get_global_context): Register the main translation unit through the new debug hook. gcc/fortran/ChangeLog: * f95-lang.c (gfc_create_decls): Register the main translation unit through the new debug hook. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224371 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 3bed5382600..ffd068aadeb 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3831,6 +3831,8 @@ cxx_init_decl_processing (void)
global_namespace = build_lang_decl (NAMESPACE_DECL, global_scope_name,
void_type_node);
DECL_CONTEXT (global_namespace) = build_translation_unit_decl (NULL_TREE);
+ debug_hooks->register_main_translation_unit
+ (DECL_CONTEXT (global_namespace));
TREE_PUBLIC (global_namespace) = 1;
begin_scope (sk_namespace, global_namespace);