return;
}
- if (!CODE_CONTAINS_STRUCT (TREE_CODE (node), TS_DECL_COMMON)
- || !DECL_LANG_SPECIFIC (node))
- return;
-
if (TREE_CODE (node) == FUNCTION_DECL)
{
int flags = TFF_DECL_SPECIFIERS|TFF_RETURN_TYPE
need_indent = false;
}
+ if (!CODE_CONTAINS_STRUCT (TREE_CODE (node), TS_DECL_COMMON)
+ || !DECL_LANG_SPECIFIC (node))
+ return;
+
if (DECL_EXTERNAL (node) && DECL_NOT_REALLY_EXTERN (node))
{
if (need_indent)
need_indent = false;
}
- if (VAR_OR_FUNCTION_DECL_P (node)
+ if ((VAR_OR_FUNCTION_DECL_P (node)
+ || TREE_CODE (node) == FIELD_DECL
+ || TREE_CODE (node) == TYPE_DECL
+ || TREE_CODE (node) == CONCEPT_DECL
+ || TREE_CODE (node) == TEMPLATE_DECL)
&& DECL_TEMPLATE_INFO (node))
- print_node (file, "template-info", DECL_TEMPLATE_INFO (node),
- indent + 4);
+ {
+ print_node (file, "template-info", DECL_TEMPLATE_INFO (node),
+ indent + 4);
+ indent_to (file, indent + 3);
+ fprintf (file, " use_template=%d", DECL_USE_TEMPLATE (node));
+ }
}
void
cxx_print_type (FILE *file, tree node, int indent)
{
+ if (TYPE_LANG_SPECIFIC (node)
+ && TYPE_TEMPLATE_INFO (node))
+ print_node (file, "template-info", TYPE_TEMPLATE_INFO (node), indent + 4);
+
switch (TREE_CODE (node))
{
case BOUND_TEMPLATE_TEMPLATE_PARM:
- print_node (file, "args", TYPE_TI_ARGS (node), indent + 4);
- gcc_fallthrough ();
-
case TEMPLATE_TYPE_PARM:
case TEMPLATE_TEMPLATE_PARM:
- indent_to (file, indent + 3);
- fprintf (file, "index %d level %d orig_level %d",
- TEMPLATE_TYPE_IDX (node), TEMPLATE_TYPE_LEVEL (node),
- TEMPLATE_TYPE_ORIG_LEVEL (node));
+ print_node (file, "tpi", TEMPLATE_TYPE_PARM_INDEX (node), indent + 4);
return;
case FUNCTION_TYPE: