diff options
Diffstat (limited to 'gcc/cp/ptree.c')
-rw-r--r-- | gcc/cp/ptree.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c index f8d2208..1e9fdf8 100644 --- a/gcc/cp/ptree.c +++ b/gcc/cp/ptree.c @@ -59,6 +59,42 @@ cxx_print_decl (FILE *file, tree node, int indent) bool need_indent = true; + if (TREE_CODE (node) == FUNCTION_DECL + || TREE_CODE (node) == VAR_DECL + || TREE_CODE (node) == TYPE_DECL + || TREE_CODE (node) == TEMPLATE_DECL + || TREE_CODE (node) == CONCEPT_DECL + || TREE_CODE (node) == NAMESPACE_DECL) + { + unsigned m = 0; + if (DECL_LANG_SPECIFIC (node) && DECL_MODULE_IMPORT_P (node)) + m = get_importing_module (node, true); + + if (const char *name = m == ~0u ? "" : module_name (m, true)) + { + if (need_indent) + indent_to (file, indent + 3); + fprintf (file, " module %d:%s", m, name); + need_indent = false; + } + + if (DECL_LANG_SPECIFIC (node) && DECL_MODULE_PURVIEW_P (node)) + { + if (need_indent) + indent_to (file, indent + 3); + fprintf (file, " purview"); + need_indent = false; + } + } + + if (DECL_MODULE_EXPORT_P (node)) + { + if (need_indent) + indent_to (file, indent + 3); + fprintf (file, " exported"); + need_indent = false; + } + if (DECL_EXTERNAL (node) && DECL_NOT_REALLY_EXTERN (node)) { if (need_indent) |