diff options
author | Tom Tromey <tromey@adacore.com> | 2024-04-18 09:08:23 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-05-17 13:08:08 -0600 |
commit | 9b6acf5357818ce7ff234c504ed79078a06d0e0f (patch) | |
tree | 44b13707d3ff99519924e917a573dc5afb78b39a | |
parent | 770657d02c986c8724214dba51f21bb3c299ebae (diff) | |
download | gcc-9b6acf5357818ce7ff234c504ed79078a06d0e0f.zip gcc-9b6acf5357818ce7ff234c504ed79078a06d0e0f.tar.gz gcc-9b6acf5357818ce7ff234c504ed79078a06d0e0f.tar.bz2 |
Use DW_TAG_module for Ada
DWARF is not especially clear on the distinction between
DW_TAG_namespace and DW_TAG_module, but I think that DW_TAG_module is
more appropriate for Ada. This patch changes the compiler to do this.
Note that the Ada compiler does not yet create NAMESPACE_DECLs.
gcc
* dwarf2out.cc (gen_namespace_die): Use DW_TAG_module for Ada.
-rw-r--r-- | gcc/dwarf2out.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index 70b7f5f..5b064ff 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -27003,7 +27003,7 @@ gen_namespace_die (tree decl, dw_die_ref context_die) { /* Output a real namespace or module. */ context_die = setup_namespace_context (decl, comp_unit_die ()); - namespace_die = new_die (is_fortran () || is_dlang () + namespace_die = new_die (is_fortran () || is_dlang () || is_ada () ? DW_TAG_module : DW_TAG_namespace, context_die, decl); /* For Fortran modules defined in different CU don't add src coords. */ |