aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2013-08-04 16:47:42 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2013-08-04 16:47:42 +0000
commit137a1a27e25efa3c13842c1c91a55947ed005412 (patch)
treea9fb7dfe70a003cc0c4e1eece6d35bd2539f1fee /gcc/c-family
parent8ee9fbe1976e0e237ac5defc6ee398f9f5f77c9e (diff)
downloadgcc-137a1a27e25efa3c13842c1c91a55947ed005412.zip
gcc-137a1a27e25efa3c13842c1c91a55947ed005412.tar.gz
gcc-137a1a27e25efa3c13842c1c91a55947ed005412.tar.bz2
pretty-print.h (pp_bar_bar): New.
* pretty-print.h (pp_bar_bar): New. (pp_ampersand_ampersand): Likewise. (pp_less_equal): Likewise. (pp_greater_equal): Likewise. * gimple-pretty-print.c (dump_ternary_rhs): Use specialized pretty printer functions instead of pp_string or operators and punctuators. (dump_gimple_call): Likewise. (dump_gimple_omp_for): Likewise. (dump_gimple_transaction): Likewise. (dump_gimple_phi): Likewise. (pp_gimple_stmt_1): Likewise. * sched-vis.c (print_insn): Likewise. * tree-mudflap.c (mf_varname_tree): Likewise. * tree-pretty-print.c (dump_block_node): Likewise. (dump_generic_node): Likewise. c-family/ * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty printer functions instead of pp_string or operators and punctuators. (dump_generic_ada_node): Likewise. * c-pretty-print.c (pp_c_type_specifier): Likewise. (pp_c_relational_expression): Likewise. (pp_c_logical_or_expression): Likewise. cp/ * error.c (dump_type_prefix): Use specialized pretty printer functions instead of pp_string or operators and punctuators. (dump_decl): Likewise. (dump_expr): Likewise. From-SVN: r201474
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog9
-rw-r--r--gcc/c-family/c-ada-spec.c12
-rw-r--r--gcc/c-family/c-pretty-print.c12
3 files changed, 21 insertions, 12 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index d3b9306..019ee80 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,5 +1,14 @@
2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
+ * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
+ printer functions instead of pp_string or operators and punctuators.
+ (dump_generic_ada_node): Likewise.
+ * c-pretty-print.c (pp_c_type_specifier): Likewise.
+ (pp_c_relational_expression): Likewise.
+ (pp_c_logical_or_expression): Likewise.
+
+2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
* c-ada-spec.c (print_ada_macros): Use specialized pretty printer
functions instead of pp_character.
(pp_ada_tree_identifier): Likewise.
diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c
index 1d0fcd2..8670b94 100644
--- a/gcc/c-family/c-ada-spec.c
+++ b/gcc/c-family/c-ada-spec.c
@@ -1266,7 +1266,7 @@ pp_ada_tree_identifier (pretty_printer *buffer, tree node, tree type,
{
pp_string (buffer, "Class_");
pp_string (buffer, s);
- pp_string (buffer, ".");
+ pp_dot (buffer);
}
}
@@ -1626,7 +1626,7 @@ dump_sloc (pretty_printer *buffer, tree node)
if (xloc.file)
{
pp_string (buffer, xloc.file);
- pp_string (buffer, ":");
+ pp_colon (buffer);
pp_decimal_int (buffer, xloc.line);
}
}
@@ -1886,14 +1886,14 @@ dump_generic_ada_node (pretty_printer *buffer, tree node, tree type,
bool first = true;
spc += INDENT_INCR;
newline_and_indent (buffer, spc - 1);
- pp_string (buffer, "(");
+ pp_left_paren (buffer);
for (; value; value = TREE_CHAIN (value))
{
if (first)
first = false;
else
{
- pp_string (buffer, ",");
+ pp_comma (buffer);
newline_and_indent (buffer, spc);
}
@@ -1907,7 +1907,7 @@ dump_generic_ada_node (pretty_printer *buffer, tree node, tree type,
dump_generic_ada_node
(buffer, DECL_NAME (type) ? type : TYPE_NAME (node), type,
cpp_check, spc, 0, true);
- pp_string (buffer, ")");
+ pp_right_paren (buffer);
}
else
{
@@ -2032,7 +2032,7 @@ dump_generic_ada_node (pretty_printer *buffer, tree node, tree type,
pp_string (buffer, "pragma Convention (C, ");
dump_generic_ada_node
(buffer, type, 0, cpp_check, spc, false, true);
- pp_string (buffer, ")");
+ pp_right_paren (buffer);
}
}
else
diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c
index 375f6dc..0a71ece 100644
--- a/gcc/c-family/c-pretty-print.c
+++ b/gcc/c-family/c-pretty-print.c
@@ -370,7 +370,7 @@ pp_c_type_specifier (c_pretty_printer *pp, tree t)
pp_c_type_specifier (pp, t);
if (TYPE_PRECISION (t) != prec)
{
- pp_string (pp, ":");
+ pp_colon (pp);
pp_decimal_int (pp, prec);
}
}
@@ -393,7 +393,7 @@ pp_c_type_specifier (c_pretty_printer *pp, tree t)
gcc_unreachable ();
}
pp_decimal_int (pp, prec);
- pp_string (pp, ">");
+ pp_greater (pp);
}
}
break;
@@ -1920,9 +1920,9 @@ pp_c_relational_expression (c_pretty_printer *pp, tree e)
else if (code == GT_EXPR)
pp_greater (pp);
else if (code == LE_EXPR)
- pp_string (pp, "<=");
+ pp_less_equal (pp);
else if (code == GE_EXPR)
- pp_string (pp, ">=");
+ pp_greater_equal (pp);
pp_c_whitespace (pp);
pp_c_shift_expression (pp, TREE_OPERAND (e, 1));
break;
@@ -2032,7 +2032,7 @@ pp_c_logical_and_expression (c_pretty_printer *pp, tree e)
{
pp_c_logical_and_expression (pp, TREE_OPERAND (e, 0));
pp_c_whitespace (pp);
- pp_string (pp, "&&");
+ pp_ampersand_ampersand (pp);
pp_c_whitespace (pp);
pp_c_inclusive_or_expression (pp, TREE_OPERAND (e, 1));
}
@@ -2052,7 +2052,7 @@ pp_c_logical_or_expression (c_pretty_printer *pp, tree e)
{
pp_c_logical_or_expression (pp, TREE_OPERAND (e, 0));
pp_c_whitespace (pp);
- pp_string (pp, "||");
+ pp_bar_bar (pp);
pp_c_whitespace (pp);
pp_c_logical_and_expression (pp, TREE_OPERAND (e, 1));
}