aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-05-14 16:08:11 -0400
committerJason Merrill <jason@gcc.gnu.org>2018-05-14 16:08:11 -0400
commit403f22aae5b6e4e8f0e50b89b41a82aaf910931e (patch)
tree44823e1213f902339f160615a5c9aef85d4f9e09 /gcc/cp/mangle.c
parentdc05c538c95025b0ac7c7d7313666e2f7550d548 (diff)
downloadgcc-403f22aae5b6e4e8f0e50b89b41a82aaf910931e.zip
gcc-403f22aae5b6e4e8f0e50b89b41a82aaf910931e.tar.gz
gcc-403f22aae5b6e4e8f0e50b89b41a82aaf910931e.tar.bz2
Handle TYPE_HAS_LATE_RETURN_TYPE like ref-qualifier and eh spec.
* tree.c (build_cp_fntype_variant): New. (build_ref_qualified_type, build_exception_variant) (strip_typedefs, cxx_copy_lang_qualifiers): Use it. (cxx_type_hash_eq, cp_check_qualified_type): Check TYPE_HAS_LATE_RETURN_TYPE. (cp_build_type_attribute_variant): Check cxx_type_hash_eq. (cp_build_qualified_type_real): No need to preserve C++ qualifiers. * class.c (build_clone): Use cxx_copy_lang_qualifiers. (adjust_clone_args): Likewise. * decl.c (grokfndecl): Add late_return_type_p parameter. Use build_cp_fntype_variant. (grokdeclarator): Pass late_return_type_p to grokfndecl. (check_function_type): Use cxx_copy_lang_qualifiers. (static_fn_type): Use cxx_copy_lang_qualifiers. * decl2.c (build_memfn_type, maybe_retrofit_in_chrg) (cp_reconstruct_complex_type, coerce_new_type, coerce_delete_type) (change_return_type): Use cxx_copy_lang_qualifiers. * mangle.c (write_type): Use cxx_copy_lang_qualifiers. * parser.c (cp_parser_lambda_declarator_opt): Represent an explicit return type on the declarator like a normal trailing return type. * pt.c (tsubst_function_type): Use build_cp_fntype_variant. (copy_default_args_to_explicit_spec): Use cxx_copy_lang_qualifiers. * typeck.c (merge_types): Use build_cp_fntype_variant. From-SVN: r260238
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 58b3311..387990b 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -2155,11 +2155,7 @@ write_type (tree type)
type = TYPE_MAIN_VARIANT (type);
if (TREE_CODE (type) == FUNCTION_TYPE
|| TREE_CODE (type) == METHOD_TYPE)
- {
- type = build_ref_qualified_type (type, type_memfn_rqual (type_orig));
- type = build_exception_variant (type,
- TYPE_RAISES_EXCEPTIONS (type_orig));
- }
+ type = cxx_copy_lang_qualifiers (type, type_orig);
/* According to the C++ ABI, some library classes are passed the
same as the scalar type of their single member and use the same