aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-08-11 21:13:52 -0400
committerPatrick Palka <ppalka@redhat.com>2023-08-11 21:13:52 -0400
commit8be20733b38c200f375cacf698d6b85e76055bcd (patch)
tree49d45b402d2fcc284977b47aee2e04efedcbe611
parentf50f603cbfd05653555e9856360c83108bbd1d8a (diff)
downloadgcc-8be20733b38c200f375cacf698d6b85e76055bcd.zip
gcc-8be20733b38c200f375cacf698d6b85e76055bcd.tar.gz
gcc-8be20733b38c200f375cacf698d6b85e76055bcd.tar.bz2
tree-pretty-print: delimit TREE_VEC with braces
This makes the generic pretty printer print braces around a TREE_VEC, like we do for CONSTRUCTOR. This should improve readability of nested TREE_VECs in particular. gcc/ChangeLog: * tree-pretty-print.cc (dump_generic_node) <case TREE_VEC>: Delimit output with braces.
-rw-r--r--gcc/tree-pretty-print.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-pretty-print.cc b/gcc/tree-pretty-print.cc
index 51a2135..579037b 100644
--- a/gcc/tree-pretty-print.cc
+++ b/gcc/tree-pretty-print.cc
@@ -1900,6 +1900,7 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
case TREE_VEC:
{
size_t i;
+ pp_left_brace (pp);
if (TREE_VEC_LENGTH (node) > 0)
{
size_t len = TREE_VEC_LENGTH (node);
@@ -1913,6 +1914,7 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
dump_generic_node (pp, TREE_VEC_ELT (node, len - 1), spc,
flags, false);
}
+ pp_right_brace (pp);
}
break;