From: Devang Patel <dpatel@apple.com>
Date: February 1, 2004 12:54:06 PM PST
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH] PR/8354
While emitting new type die, reuse existing one if available.
Bootstrapped and tested on i686-pc-linux-gnu.
GCC, libstdc++ and GDB DejaGNU tests do not report any new
regression.
OK for mainline?
Thank you,
--
Devang
2004-01-02 Devang Patel <dpatel@apple.com>
PR/8354
*dwarf2out.c (modified_type_die): Reuse existing type die.
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.483
diff -c -3 -p -r1.483 dwarf2out.c
*** dwarf2out.c 29 Jan 2004 18:42:56 -0000 1.483
--- dwarf2out.c 1 Feb 2004 20:43:06 -0000
*************** modified_type_die (tree type, int is_con
*** 7964,7969 ****
--- 7964,7977 ----
/* Else cv-qualified version of named type; fall through. */
}
+ /* Just reuse the type die, if it exists. */
+ if (!mod_type_die)
+ {
+ mod_type_die = lookup_type_die (type);
+ if (mod_type_die)
+ return mod_type_die;
+ }
+
if (mod_type_die)
/* OK. */
;