aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ptree.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-06-22 18:40:56 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-06-22 18:40:56 +0000
commit84c0088f38ce49f390401d11a581cd1a57a008d5 (patch)
treecd6adfd3e1e3f4244a38c183860b2efd2b25593c /gcc/cp/ptree.c
parent13f752b27354d0b8f7ff0148973c6b478e6fdd9e (diff)
downloadgcc-84c0088f38ce49f390401d11a581cd1a57a008d5.zip
gcc-84c0088f38ce49f390401d11a581cd1a57a008d5.tar.gz
gcc-84c0088f38ce49f390401d11a581cd1a57a008d5.tar.bz2
Reorder IDENTIFIER flags
Reorder IDENTIFIER flags gcc/cp/ * cp-tree.h (enum cp_identifier_kind): New. (IDENTIFIER_KIND_BIT_0, IDENTIFIER_KIND_BIT_1, IDENTIFIER_KIND_BIT_2): New. (IDENTIFIER_MARKED): Move to TREE_LANG_FLAG_4. (IDENTIFIER_VIRTUAL_P, IDENTIFIER_REPO_CHOSEN): Add IDENTIFIER_CHECK. (C_IS_RESERVED_WORD): Replace with ... (IDENTIFIER_KEYWORD_P): ... this. (IDENTIFIER_CTOR_OR_DTOR_P): Replace with ... (IDENTIFIER_CDTOR_P): ... this. (IDENTIFIER_CTOR_P, IDENTIFIER_DTOR_P): New. (IDENTIFIER_OPNAME_P): Replace with ... (IDENTIFIER_ANY_OP_P): ... this. (IDENTIFIER_ASSIGN_OP_P): New. (IDENTIFIER_TYPENAME_P): Replace with ... (IDENTIFIER_CONV_OP_P): ... this. (NEW_DELETE_OPNAME_P): Replace with ... (IDENTIFIER_NEWDEL_OP_P): ... this. (DECL_CONV_FN_P, DECL_OVERLOADED_OPERATOR_P): Adjust. (get_identifier_kind_name, set_identifier_kind): Declare. * lex.c (get_identifier_kind_name, set_identifier_kind): New. (init_operators): Adjust to avoid keywords, use set_identifier_kind. Copy TYPE_EXPR slot. (init_reswords): Call set_identifier_kind. (unqualified_name_lookup_error): Adjust. * operators.def (TYPE_EXPR): Remove. * decl.c (struct predefined_identifier): Move into ... (initialize_predefined_identifiers): ... here. Call set_identifier_kind. (grokfndecl, check_var_type, grokdeclarator): Adjust. (grok_op_properties): Use IDENTIFIER_ANY_ASSIGN_OP to halve search space. Adjust. * call.c (name_as_c_string): Adjust. (build_new_method_call_1): Likewise. * cp-cilkplus.c (is_conversion_operator_function_decl_p): Likewise. * cxx-pretty-print.c (pp_cxx_unqualified_id): Adjust. * dump.c (cp_dump_tree): Adjust. * error.c (dump_decl_name): Adjust. * mangle.c (write_unqualified_id, write_member_name) write_expression): Adjust. (mangle_conv_op_name_for_type): Use set_identifier_kind. * name-lookup.c (do_class_using_decl): Adjust. (lookup_name_fuzzy, lookup_name_real_1): Likewise. * parser.c (cp_lexer_get_preprocessor_token) cp_parser_direct_declarator): Likewise. * pt.c (push_template_decl_real, tsubst_decl, tsubst_baselink) tsubst_copy, tsubst_copy_and_build): Adjust. * ptree.c (cxx_print_identifier): Print identifier kind. * search.c (lookup_field_r, lookup_member) lookup_fnfields_idx_nolazy): Adjust. * semantics.c (finish_id_expression): Adjust.. * typeck.c (cp_build_addr_expr_1): Adjust. From-SVN: r249571
Diffstat (limited to 'gcc/cp/ptree.c')
-rw-r--r--gcc/cp/ptree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index 5775e07..7b69dbe 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -178,7 +178,8 @@ cxx_print_identifier (FILE *file, tree node, int indent)
fprintf (file, " ");
else
indent_to (file, indent + 4);
- fprintf (file, "local bindings <%p>", (void *) IDENTIFIER_BINDING (node));
+ fprintf (file, "%s local bindings <%p>", get_identifier_kind_name (node),
+ (void *) IDENTIFIER_BINDING (node));
print_node (file, "label", IDENTIFIER_LABEL_VALUE (node), indent + 4);
print_node (file, "template", IDENTIFIER_TEMPLATE (node), indent + 4);
}