aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2006-12-27 21:48:05 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2006-12-27 21:48:05 +0000
commitae64e535a30ebe01bd161401617a107e773507e6 (patch)
tree590ca948ecbffd9a162d22d24a1d71692ed37595 /gcc/dwarf2out.c
parent88549b8155f58e82191f5d5382b87ac4084dbfec (diff)
downloadgcc-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/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c7
1 files changed, 6 insertions, 1 deletions
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);