aboutsummaryrefslogtreecommitdiff
path: root/gcc/langhooks.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-09-08 18:39:17 -0400
committerJason Merrill <jason@gcc.gnu.org>2017-09-08 18:39:17 -0400
commit27c825c5cca3243f293aee29a4abeb22242d4d2b (patch)
treed4c20252428e4348fc569284133594067d73b3c8 /gcc/langhooks.h
parentb2c5d6f1d2a71374bcd8277a0697490582bc03a8 (diff)
downloadgcc-27c825c5cca3243f293aee29a4abeb22242d4d2b.zip
gcc-27c825c5cca3243f293aee29a4abeb22242d4d2b.tar.gz
gcc-27c825c5cca3243f293aee29a4abeb22242d4d2b.tar.bz2
PR c++/70029 - ICE with ref-qualifier and -flto
PR c++/70029 - ICE with ref-qualifier and -flto gcc/ * langhooks.h (struct lang_hooks_for_types): Add copy_lang_qualifiers. * attribs.c (build_type_attribute_qual_variant): Use it. * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to NULL. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it. * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check. gcc/cp/ * tree.c (cxx_copy_lang_qualifiers): New. * cp-tree.h: Declare it. * cp-objcp-common.h: Define LANG_HOOKS_COPY_LANG_QUALIFIERS. From-SVN: r251911
Diffstat (limited to 'gcc/langhooks.h')
-rw-r--r--gcc/langhooks.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 88f6f71..b0c9829 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -123,6 +123,10 @@ struct lang_hooks_for_types
FUNCTION_TYPE or METHOD_TYPE. */
bool (*type_hash_eq) (const_tree, const_tree);
+ /* If non-NULL, return TYPE1 with any language-specific modifiers copied from
+ TYPE2. */
+ tree (*copy_lang_qualifiers) (const_tree, const_tree);
+
/* Return TRUE if TYPE uses a hidden descriptor and fills in information
for the debugger about the array bounds, strides, etc. */
bool (*get_array_descr_info) (const_tree, struct array_descr_info *);