]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarf2out.c (gen_type_die): Check for typedefs before calling for TYPE_MAIN_VARIANT.
authorDaniel Jacobowitz <drow@mvista.com>
Sat, 8 Feb 2003 21:51:53 +0000 (21:51 +0000)
committerDaniel Jacobowitz <drow@gcc.gnu.org>
Sat, 8 Feb 2003 21:51:53 +0000 (21:51 +0000)
* dwarf2out.c (gen_type_die): Check for typedefs before calling
for TYPE_MAIN_VARIANT.

From-SVN: r62585

gcc/ChangeLog
gcc/dwarf2out.c

index 257001738cb34c807934fa23fa460ae658875948..4d56e63e0c9d0da9d9720166b48533cbdd1d2104 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-01  Daniel Jacobowitz  <drow@mvista.com>
+
+       * dwarf2out.c (gen_type_die): Check for typedefs before calling
+       for TYPE_MAIN_VARIANT.
+
 2003-02-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa.c (output_millicode_call): Use $PIC_pcrel$0 for long PIC
index c691dd0875ae712e08c5fe44bc63712377f3c94d..4eaa81b38d65cb43d87056d6969eae72653fdec7 100644 (file)
@@ -11058,22 +11058,25 @@ gen_type_die (type, context_die)
   if (type == NULL_TREE || type == error_mark_node)
     return;
 
-  /* We are going to output a DIE to represent the unqualified version of
-     this type (i.e. without any const or volatile qualifiers) so get the
-     main variant (i.e. the unqualified version) of this type now.  */
-  type = type_main_variant (type);
-
-  if (TREE_ASM_WRITTEN (type))
-    return;
-
   if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
       && DECL_ORIGINAL_TYPE (TYPE_NAME (type)))
     {
+      if (TREE_ASM_WRITTEN (type))
+       return;
+
       TREE_ASM_WRITTEN (type) = 1;
       gen_decl_die (TYPE_NAME (type), context_die);
       return;
     }
 
+  /* We are going to output a DIE to represent the unqualified version of
+     this type (i.e. without any const or volatile qualifiers) so get the
+     main variant (i.e. the unqualified version) of this type now.  */
+  type = type_main_variant (type);
+
+  if (TREE_ASM_WRITTEN (type))
+    return;
+
   switch (TREE_CODE (type))
     {
     case ERROR_MARK: