diff options
author | Ian Lance Taylor <iant@google.com> | 2006-12-27 21:48:05 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2006-12-27 21:48:05 +0000 |
commit | ae64e535a30ebe01bd161401617a107e773507e6 (patch) | |
tree | 590ca948ecbffd9a162d22d24a1d71692ed37595 /gcc | |
parent | 88549b8155f58e82191f5d5382b87ac4084dbfec (diff) | |
download | gcc-ae64e535a30ebe01bd161401617a107e773507e6.zip gcc-ae64e535a30ebe01bd161401617a107e773507e6.tar.gz gcc-ae64e535a30ebe01bd161401617a107e773507e6.tar.bz2 |
re PR debug/26964 (Duplicate debug info for enums in namespaces)
PR debug/26964
* dwarf2out.c (gen_type_die): Don't write out a DIE for
ENUMERAL_TYPE if it was already written out.
From-SVN: r120221
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9a1535..6a9a337 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-12-27 Ian Lance Taylor <iant@google.com> + + PR debug/26964 + * dwarf2out.c (gen_type_die): Don't write out a DIE for + ENUMERAL_TYPE if it was already written out. + 2006-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> PR middle-end/29335 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 54e2c33..6cd3435 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12725,7 +12725,12 @@ gen_type_die (tree type, dw_die_ref context_die) } if (TREE_CODE (type) == ENUMERAL_TYPE) - gen_enumeration_type_die (type, context_die); + { + /* This might have been written out by the call to + declare_in_namespace. */ + if (!TREE_ASM_WRITTEN (type)) + gen_enumeration_type_die (type, context_die); + } else gen_struct_or_union_type_die (type, context_die); |