aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-02-24 14:47:30 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-02-24 14:47:30 +0000
commit844216f3811e342886523f1ee4a3068afb4dc726 (patch)
tree06188d1afab9e1537025329457718138346a7617 /gcc
parent71adbef3ea0454c98d098d7adfc071aa29fa0a88 (diff)
downloadgcc-844216f3811e342886523f1ee4a3068afb4dc726.zip
gcc-844216f3811e342886523f1ee4a3068afb4dc726.tar.gz
gcc-844216f3811e342886523f1ee4a3068afb4dc726.tar.bz2
re PR debug/39285 (Missing debug info for enum members in C++)
2009-02-24 Richard Guenther <rguenther@suse.de> PR debug/39285 * dwarf2out.c (gen_enumeration_type_die): Handle CONST_DECLs. From-SVN: r144407
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c89a3f4..3083dae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,9 @@
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>
PR tree-optimization/39233
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 2e5f032..ed165c8 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -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