OSDN Git Service

* mangle.c (finish_mangling_get_identifier): Use
[pf3gnuchains/gcc-fork.git] / gcc / cp / ptree.c
index 2452abc..a1fa71f 100644 (file)
@@ -65,10 +65,6 @@ cxx_print_decl (FILE *file, tree node, int indent)
       && DECL_PENDING_INLINE_INFO (node))
     fprintf (file, " pending-inline-info %p",
             (void *) DECL_PENDING_INLINE_INFO (node));
-  if (TREE_CODE (node) == TYPE_DECL
-      && DECL_SORTED_FIELDS (node))
-    fprintf (file, " sorted-fields %p",
-            (void *) DECL_SORTED_FIELDS (node));
   if ((TREE_CODE (node) == FUNCTION_DECL || TREE_CODE (node) == VAR_DECL)
       && DECL_TEMPLATE_INFO (node))
     fprintf (file, " template-info %p",
@@ -97,11 +93,12 @@ cxx_print_type (FILE *file, tree node, int indent)
 
     case RECORD_TYPE:
     case UNION_TYPE:
-      indent_to (file, indent + 4);
-      fprintf (file, "full-name \"%s\"",
-              type_as_string (node, TFF_CLASS_KEY_OR_ENUM));
       break;
 
+    case DECLTYPE_TYPE:
+      print_node (file, "expr", DECLTYPE_TYPE_EXPR (node), indent + 4);
+      return;
+
     default:
       return;
     }
@@ -113,6 +110,10 @@ cxx_print_type (FILE *file, tree node, int indent)
   if (! CLASS_TYPE_P (node))
     return;
 
+  indent_to (file, indent + 4);
+  fprintf (file, "full-name \"%s\"",
+          type_as_string (node, TFF_CLASS_KEY_OR_ENUM));
+
   indent_to (file, indent + 3);
 
   if (TYPE_NEEDS_CONSTRUCTING (node))
@@ -140,6 +141,9 @@ cxx_print_type (FILE *file, tree node, int indent)
     fputs (" delete[]", file);
   if (TYPE_HAS_ASSIGN_REF (node))
     fputs (" this=(X&)", file);
+  if (CLASSTYPE_SORTED_FIELDS (node))
+    fprintf (file, " sorted-fields %p",
+            (void *) CLASSTYPE_SORTED_FIELDS (node));
 
   if (TREE_CODE (node) == RECORD_TYPE)
     {