aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Wood <wood@gnu.org>1992-10-20 20:49:26 +0000
committerTom Wood <wood@gnu.org>1992-10-20 20:49:26 +0000
commite6d9804cefdc541b7a85479ca4f97f856d14082f (patch)
tree86b7a0b8e2ad5acc16cbae8522544d2bc7f0c889
parent59b2d7222d18108026282f950e94ba8d5a01769a (diff)
downloadgcc-e6d9804cefdc541b7a85479ca4f97f856d14082f.zip
gcc-e6d9804cefdc541b7a85479ca4f97f856d14082f.tar.gz
gcc-e6d9804cefdc541b7a85479ca4f97f856d14082f.tar.bz2
(dwarfout_file_scope_decl): Generate DIEs for
built-in non-fundamental types. From-SVN: r2528
-rw-r--r--gcc/dwarfout.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index b83cd7f..722fff5 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -3878,7 +3878,7 @@ output_type (type, containing_scope)
case POINTER_TYPE:
case REFERENCE_TYPE:
/* For these types, all that is required is that we output a DIE
- (or a set of DIEs) to represent that "basis" type. */
+ (or a set of DIEs) to represent the "basis" type. */
output_type (TREE_TYPE (type), containing_scope);
break;
@@ -4774,9 +4774,18 @@ dwarfout_file_scope_decl (decl, set_finalizing)
break;
case TYPE_DECL:
- /* Don't generate any DIEs to represent the standard built-in types. */
-
- if (DECL_SOURCE_LINE (decl) == 0)
+ /* Don't bother trying to generate any DIEs to represent any of the
+ normal built-in types for the language we are compiling, except
+ in cases where the types in question are *not* DWARF fundamental
+ types. We make an exception in the case of non-fundamental types
+ for the sake of objective C (and perhaps C++) because the GNU
+ front-ends for these languages may in fact create certain "built-in"
+ types which are (for example) RECORD_TYPEs. In such cases, we
+ really need to output these (non-fundamental) types because other
+ DIEs may contain references to them. */
+
+ if (DECL_SOURCE_LINE (decl) == 0
+ && type_is_fundamental (TREE_TYPE (decl)))
return;
/* If we are in terse mode, don't generate any DIEs to represent