aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/utils.c7
-rw-r--r--gcc/dwarf2out.c6
4 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8fb9152..d61154f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2015-11-24 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ * dwarf2out.c (gen_decl_die): Generate DW_TAG_imported_* instead of
+ DW_TAG_namespace for IMPORTED_DECL declarations. Call
+ dwarf2out_imported_module_or_decl_1 for all DWARF versions as this
+ function already takes care of checking what it can emit.
+
2015-11-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
* doc/invoke.texi (-fpic): Add the AArch64 limit.
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index a83124f..e5c2441 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-24 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ * gcc-interface/utils.c (gnat_write_global_declarations): Output
+ debugging information for top-level imported declarations.
+
2015-11-24 Gary Dismukes <dismukes@adacore.com>
* sem_ch3.adb, sem_type.adb, sem_ch7.adb, sem_ch9.adb, checks.adb,
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index aa2fdf2..0016a3f 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -5281,6 +5281,13 @@ gnat_write_global_declarations (void)
FOR_EACH_VEC_SAFE_ELT (global_decls, i, iter)
if (TREE_CODE (iter) == VAR_DECL)
rest_of_decl_compilation (iter, true, 0);
+
+ /* Output the imported modules/declarations. In GNAT, these are only
+ materializing subprogram. */
+ FOR_EACH_VEC_SAFE_ELT (global_decls, i, iter)
+ if (TREE_CODE (iter) == IMPORTED_DECL && !DECL_IGNORED_P (iter))
+ debug_hooks->imported_module_or_decl (iter, DECL_NAME (iter),
+ DECL_CONTEXT (iter), 0);
}
/* ************************************************************************
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index f184750..d46a671 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -21585,11 +21585,15 @@ gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
context_die);
case NAMESPACE_DECL:
- case IMPORTED_DECL:
if (dwarf_version >= 3 || !dwarf_strict)
gen_namespace_die (decl, context_die);
break;
+ case IMPORTED_DECL:
+ dwarf2out_imported_module_or_decl_1 (decl, DECL_NAME (decl),
+ DECL_CONTEXT (decl), context_die);
+ break;
+
case NAMELIST_DECL:
gen_namelist_decl (DECL_NAME (decl), context_die,
NAMELIST_DECL_ASSOCIATED_DECL (decl));