diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-07-25 18:47:18 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-07-25 18:47:18 +0200 |
commit | cf7fb52d9564cbe0d8e5b4d0df242db29e4681fe (patch) | |
tree | a90e9515d42626fbb89e23c142acb42c5d207992 /gcc/cp/parser.c | |
parent | 213f5e8accc3e6dad179eafd48c920e524b56be2 (diff) | |
download | gcc-cf7fb52d9564cbe0d8e5b4d0df242db29e4681fe.zip gcc-cf7fb52d9564cbe0d8e5b4d0df242db29e4681fe.tar.gz gcc-cf7fb52d9564cbe0d8e5b4d0df242db29e4681fe.tar.bz2 |
cp-tree.h (enum cp_tree_index): Add CPTI_{ABI_TAG,ALIGNED,BEGIN,END,GET,TUPLE_{ELEMENT,SIZE}}_IDENTIFIER and...
* cp-tree.h (enum cp_tree_index): Add
CPTI_{ABI_TAG,ALIGNED,BEGIN,END,GET,TUPLE_{ELEMENT,SIZE}}_IDENTIFIER
and CPTI_{GNU,TYPE,VALUE,FUN,CLOSURE}_IDENTIFIER.
(abi_tag_identifier, aligned_identifier, begin_identifier,
end_identifier, get__identifier, gnu_identifier,
tuple_element_identifier, tuple_size_identifier, type_identifier,
value_identifier, fun_identifier, closure_identifier): Define.
* decl.c (initialize_predefined_identifiers): Initialize the above
identifiers.
(get_tuple_size): Use tuple_size_identifier instead of
get_identifier ("tuple_size") and value_identifier instead of
get_identifier ("value").
(get_tuple_element_type): Use tuple_element_identifier instead of
get_identifier ("tuple_element") and type_identifier instead of
get_identifier ("type").
(get_tuple_decomp_init): Use get__identifier instead of
get_identifier ("get").
* lambda.c (maybe_add_lambda_conv_op): Use fun_identifier instead of
get_identifier ("_FUN").
* parser.c (cp_parser_lambda_declarator_opt): Use closure_identifier
instead of get_identifier ("__closure").
(cp_parser_std_attribute): Use gnu_identifier instead of
get_identifier ("gnu").
(cp_parser_std_attribute_spec): Likewise. Use aligned_identifier
instead of get_identifier ("aligned").
* class.c (check_abi_tags, inherit_targ_abi_tags): Use
abi_tag_identifier instead of get_identifier ("abi_tag").
From-SVN: r262976
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 3344ef3..d44a6b8 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10638,7 +10638,7 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) DECL_INITIALIZED_IN_CLASS_P (fco) = 1; DECL_ARTIFICIAL (fco) = 1; /* Give the object parameter a different name. */ - DECL_NAME (DECL_ARGUMENTS (fco)) = get_identifier ("__closure"); + DECL_NAME (DECL_ARGUMENTS (fco)) = closure_identifier; } if (template_param_list) { @@ -25341,13 +25341,13 @@ cp_parser_std_attribute (cp_parser *parser, tree attr_ns) NULL_TREE); /* C++11 noreturn attribute is equivalent to GNU's. */ if (is_attribute_p ("noreturn", attr_id)) - TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu"); + TREE_PURPOSE (TREE_PURPOSE (attribute)) = gnu_identifier; /* C++14 deprecated attribute is equivalent to GNU's. */ else if (is_attribute_p ("deprecated", attr_id)) - TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu"); + TREE_PURPOSE (TREE_PURPOSE (attribute)) = gnu_identifier; /* C++17 fallthrough attribute is equivalent to GNU's. */ else if (is_attribute_p ("fallthrough", attr_id)) - TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu"); + TREE_PURPOSE (TREE_PURPOSE (attribute)) = gnu_identifier; /* Transactional Memory TS optimize_for_synchronized attribute is equivalent to GNU transaction_callable. */ else if (is_attribute_p ("optimize_for_synchronized", attr_id)) @@ -25367,7 +25367,7 @@ cp_parser_std_attribute (cp_parser *parser, tree attr_ns) vec<tree, va_gc> *vec; int attr_flag = normal_attr; - if (attr_ns == get_identifier ("gnu") + if (attr_ns == gnu_identifier && attribute_takes_identifier_p (attr_id)) /* A GNU attribute that takes an identifier in parameter. */ attr_flag = id_attr; @@ -25580,10 +25580,9 @@ cp_parser_std_attribute_spec (cp_parser *parser) /* Build the C++-11 representation of an 'aligned' attribute. */ - attributes = - build_tree_list (build_tree_list (get_identifier ("gnu"), - get_identifier ("aligned")), - alignas_expr); + attributes + = build_tree_list (build_tree_list (gnu_identifier, + aligned_identifier), alignas_expr); } return attributes; |