diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-04-04 20:28:11 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-04-04 20:28:11 +0000 |
commit | 0a0caad9feb9ef9847f5e01eba93ff2601b90290 (patch) | |
tree | 616cd79741c3467ede8b3567c5d82a6b41c8bd84 /gcc/dwarfout.c | |
parent | f5f5446e0cb311aac29ab2a5394f647e70a8b356 (diff) | |
download | gcc-0a0caad9feb9ef9847f5e01eba93ff2601b90290.tar.gz |
(type_attribute): Use the TYPE_MAIN_VARIANT of the
given type when calling `user_def_type_attribute'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4005 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r-- | gcc/dwarfout.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index b70a467ca94..b2552a66d32 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -2827,7 +2827,16 @@ type_attribute (type, decl_const, decl_volatile) if (root_type_modified) mod_u_d_type_attribute (type, decl_const, decl_volatile); else - user_def_type_attribute (type); + /* We have to get the TYPE_MAIN_VARIANT here (and pass that to the + `user_def_type_attribute' routine) because the ..._TYPE node we + have might simply be a *copy* of some original type node (where + the copy was created to help us keep track of typedef names) + and that copy might have a different TYPE_UID from the original + ..._TYPE node. (Note that when `equate_type_number_to_die_number' + is labeling a given type DIE for future reference, it always and + only creates labels for DIEs representing *main variants*, and it + never even knows about non-main-variants.) */ + user_def_type_attribute (TYPE_MAIN_VARIANT (type)); } /* Given a tree pointer to a struct, class, union, or enum type node, return |