aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPaulo Matos <pmatos@broadcom.com>2013-10-16 10:09:17 +0000
committerPaulo Matos <pmatos@gcc.gnu.org>2013-10-16 12:09:17 +0200
commit5806f4814cd8cd4b6677bde313bd26d5b29ed073 (patch)
tree18b9fdf2590d9183a3aedbda66687c9d2c9b31c8 /gcc/cp
parent82c9df56ca621a73781b266d02b589d68a2acf8d (diff)
downloadgcc-5806f4814cd8cd4b6677bde313bd26d5b29ed073.zip
gcc-5806f4814cd8cd4b6677bde313bd26d5b29ed073.tar.gz
gcc-5806f4814cd8cd4b6677bde313bd26d5b29ed073.tar.bz2
tree-core.h (tree_code_name): Remove.
gcc/ * tree-core.h (tree_code_name): Remove. * tree.h (get_tree_code_name): New prototype. * tree.c (tree_code_name): Make static. (get_tree_code_name): New function. (dump_tree_statistics, tree_check_failed, tree_not_check_failed, tree_class_check_failed, tree_range_check_failed, tree_not_class_check_failed, omp_clause_check_failed, tree_contains_struct_check_failed, tree_operand_check_failed): Use new wrapper get_tree_code_name instead of calling tree_code_name directly. * tree-vrp.c (dump_asserts_for): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-pretty-print.c (do_niy, dump_generic_node): Likewise. * tree-pretty-print.h (pp_unsupported_tree): Likewise. * lto-streamer-out.c (lto_write_tree, DFS_write_tree): Likewise. * tree-ssa-dom.c (print_expr_hash_elt): Likewise. * gimple-pretty-print.c (dump_unary_rhs, dump_binary_rhs, dump_ternary_rhs, dump_gimple_assign, dump_gimple_cond, dump_gimple_omp_for): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * tree-ssa-pre.c (print_pre_expr): Likewise. * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * gimple.c (gimple_check_failed): Likewise. * lto-streamer.c (lto_tag_name, print_lto_report): Likewise. * config/frv/frv.c (frv_init_cumulative_args): Likewise. * config/mep/mep.c (mep_validate_vliw): Likewise. * config/iq2000/iq2000.c (init_cumulative_args): Likewise. * config/rs6000/rs6000.c (init_cumulative_args): Likewise. gcc/cp/ * error.c (code_to_string): Use new wrapper get_tree_code_name. * cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise. * pt.c (tsubst): Likewise. * semantics.c (cxx_eval_constant_expression, potential_constant_expression_1): Likewise. * mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates, add_substitution, find_substitution): Likewise. From-SVN: r203695
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog10
-rw-r--r--gcc/cp/cxx-pretty-print.c2
-rw-r--r--gcc/cp/error.c2
-rw-r--r--gcc/cp/mangle.c10
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/cp/semantics.c4
6 files changed, 20 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ed30e1b..3378d61 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,13 @@
+2013-10-16 Paulo Matos <pmatos@broadcom.com>
+
+ * error.c (code_to_string): Use new wrapper get_tree_code_name.
+ * cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
+ * pt.c (tsubst): Likewise.
+ * semantics.c (cxx_eval_constant_expression,
+ potential_constant_expression_1): Likewise.
+ * mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
+ add_substitution, find_substitution): Likewise.
+
2013-10-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58707
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index bcef876..cb97fb5 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -971,7 +971,7 @@ pp_cxx_assignment_operator (cxx_pretty_printer *pp, tree t)
break;
default:
- op = tree_code_name[TREE_CODE (t)];
+ op = get_tree_code_name (TREE_CODE (t));
break;
}
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 62e39d3..0c3cead 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2852,7 +2852,7 @@ fndecl_to_string (tree fndecl, int verbose)
static const char *
code_to_string (enum tree_code c)
{
- return tree_code_name [c];
+ return get_tree_code_name (c);
}
const char *
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 8c11ba8..202fafc 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -69,7 +69,7 @@ along with GCC; see the file COPYING3. If not see
fprintf (stderr, " %-24s: %-24s\n", (FN), (INPUT))
# define MANGLE_TRACE_TREE(FN, NODE) \
fprintf (stderr, " %-24s: %-24s (%p)\n", \
- (FN), tree_code_name[TREE_CODE (NODE)], (void *) (NODE))
+ (FN), get_tree_code_name (TREE_CODE (NODE)), (void *) (NODE))
#else
# define MANGLE_TRACE(FN, INPUT)
# define MANGLE_TRACE_TREE(FN, NODE)
@@ -329,7 +329,7 @@ dump_substitution_candidates (void)
|| CP_TYPE_CONST_P (el)))
fprintf (stderr, "CV-");
fprintf (stderr, "%s (%s at %p)\n",
- name, tree_code_name[TREE_CODE (el)], (void *) el);
+ name, get_tree_code_name (TREE_CODE (el)), (void *) el);
}
}
@@ -379,13 +379,13 @@ add_substitution (tree node)
if (DEBUG_MANGLE)
fprintf (stderr, " ++ add_substitution (%s at %10p)\n",
- tree_code_name[TREE_CODE (node)], (void *) node);
+ get_tree_code_name (TREE_CODE (node)), (void *) node);
/* Get the canonicalized substitution candidate for NODE. */
c = canonicalize_for_substitution (node);
if (DEBUG_MANGLE && c != node)
fprintf (stderr, " ++ using candidate (%s at %10p)\n",
- tree_code_name[TREE_CODE (node)], (void *) node);
+ get_tree_code_name (TREE_CODE (node)), (void *) node);
node = c;
#if ENABLE_CHECKING
@@ -513,7 +513,7 @@ find_substitution (tree node)
if (DEBUG_MANGLE)
fprintf (stderr, " ++ find_substitution (%s at %p)\n",
- tree_code_name[TREE_CODE (node)], (void *) node);
+ get_tree_code_name (TREE_CODE (node)), (void *) node);
/* Obtain the canonicalized substitution representation for NODE.
This is what we'll compare against. */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 57b3ff0..95d901c 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -12102,7 +12102,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
gcc_unreachable ();
default:
- sorry ("use of %qs in template", tree_code_name [(int) code]);
+ sorry ("use of %qs in template", get_tree_code_name ((int) code));
return error_mark_node;
}
}
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 9bfd263..41965b6 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -9656,7 +9656,7 @@ cxx_eval_constant_expression (const constexpr_call *call, tree t,
default:
internal_error ("unexpected expression %qE of kind %s", t,
- tree_code_name[TREE_CODE (t)]);
+ get_tree_code_name (TREE_CODE (t)));
*non_constant_p = true;
break;
}
@@ -10417,7 +10417,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
if (objc_is_property_ref (t))
return false;
- sorry ("unexpected AST of kind %s", tree_code_name[TREE_CODE (t)]);
+ sorry ("unexpected AST of kind %s", get_tree_code_name (TREE_CODE (t)));
gcc_unreachable();
return false;
}