]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/39285 (Missing debug info for enum members in C++)
authorRichard Guenther <rguenther@suse.de>
Tue, 24 Feb 2009 14:47:30 +0000 (14:47 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 24 Feb 2009 14:47:30 +0000 (14:47 +0000)
2009-02-24  Richard Guenther  <rguenther@suse.de>

PR debug/39285
* dwarf2out.c (gen_enumeration_type_die): Handle CONST_DECLs.

From-SVN: r144407

gcc/ChangeLog
gcc/dwarf2out.c

index c89a3f473377f57a7c60eecdf462535bb2ba1760..3083daedb97a76c9e93315b1a757ce3251d18cca 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-24  Richard Guenther  <rguenther@suse.de>
+
+       PR debug/39285
+       * dwarf2out.c (gen_enumeration_type_die): Handle CONST_DECLs.
+
 2009-02-24  Richard Guenther  <rguenther@suse.de>
        Zdenek Dvorak  <ook@ucw.cz>
 
index 2e5f032c2a260acfb4b7cfa0ed992ba2151d671a..ed165c8386b7a04216cc960a6f3e765bcd26edd0 100644 (file)
@@ -13234,6 +13234,9 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die)
          add_name_attribute (enum_die,
                              IDENTIFIER_POINTER (TREE_PURPOSE (link)));
 
+         if (TREE_CODE (value) == CONST_DECL)
+           value = DECL_INITIAL (value);
+
          if (host_integerp (value, TYPE_UNSIGNED (TREE_TYPE (value))))
            /* DWARF2 does not provide a way of indicating whether or
               not enumeration constants are signed or unsigned.  GDB