diff mbox

Generate DW_TAG_constant in Ada

Message ID 201008310903.54844.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou Aug. 31, 2010, 7:03 a.m. UTC
Ada has true named constants so DW_TAG_constant is needed for them.

Tested on x86-64-suse-linux, applied on the mainline as obvious.


2010-08-31  Eric Botcazou  <ebotcazou@adacore.com>

	* dwarf2out.c (gen_decl_die) <CONST_DECL>: Do not skip in Ada.
	(dwarf2out_decl) <CONST_DECL>: Likewise.
diff mbox

Patch

Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 163659)
+++ dwarf2out.c	(working copy)
@@ -20477,7 +20477,7 @@  gen_decl_die (tree decl, tree origin, dw
       break;
 
     case CONST_DECL:
-      if (!is_fortran ())
+      if (!is_fortran () && !is_ada ())
 	{
 	  /* The individual enumerators of an enum type get output when we output
 	     the Dwarf representation of the relevant enum type itself.  */
@@ -20888,7 +20888,7 @@  dwarf2out_decl (tree decl)
     case CONST_DECL:
       if (debug_info_level <= DINFO_LEVEL_TERSE)
 	return;
-      if (!is_fortran ())
+      if (!is_fortran () && !is_ada ())
 	return;
       if (TREE_STATIC (decl) && decl_function_context (decl))
 	context_die = lookup_decl_die (DECL_CONTEXT (decl));