It would be nice to handle language-specific codes in the tree pretty-printer, but until then we can at least indent them appropriately.
Tested x86_64-pc-linux-gnu, ok for trunk? gcc/ChangeLog: * tree-pretty-print.c (do_niy): Add spc parameter. (NIY): Pass it. (print_call_name): Add spc local variable. --- gcc/tree-pretty-print.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index a81ba401ef9..7a1c4e843d1 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -53,19 +53,19 @@ static const char *op_symbol (const_tree); static void newline_and_indent (pretty_printer *, int); static void maybe_init_pretty_print (FILE *); static void print_struct_decl (pretty_printer *, const_tree, int, dump_flags_t); -static void do_niy (pretty_printer *, const_tree, dump_flags_t); +static void do_niy (pretty_printer *, const_tree, int, dump_flags_t); #define INDENT(SPACE) do { \ int i; for (i = 0; i<SPACE; i++) pp_space (pp); } while (0) -#define NIY do_niy (pp, node, flags) +#define NIY do_niy (pp, node, spc, flags) static pretty_printer *tree_pp; /* Try to print something for an unknown tree code. */ static void -do_niy (pretty_printer *pp, const_tree node, dump_flags_t flags) +do_niy (pretty_printer *pp, const_tree node, int spc, dump_flags_t flags) { int i, len; @@ -77,8 +77,8 @@ do_niy (pretty_printer *pp, const_tree node, dump_flags_t flags) len = TREE_OPERAND_LENGTH (node); for (i = 0; i < len; ++i) { - newline_and_indent (pp, 2); - dump_generic_node (pp, TREE_OPERAND (node, i), 2, flags, false); + newline_and_indent (pp, spc+2); + dump_generic_node (pp, TREE_OPERAND (node, i), spc+2, flags, false); } } @@ -4397,6 +4397,7 @@ void print_call_name (pretty_printer *pp, tree node, dump_flags_t flags) { tree op0 = node; + int spc = 0; if (TREE_CODE (op0) == NON_LVALUE_EXPR) op0 = TREE_OPERAND (op0, 0); base-commit: c743614e7016c5b2e5c5871cba23de68134d4950 -- 2.27.0