aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorAaron Sawdey <acsawdey@linux.ibm.com>2020-11-17 17:17:44 -0600
committerAaron Sawdey <acsawdey@linux.ibm.com>2020-11-21 07:37:06 -0600
commit1e2d8575ace4e12dbe95ae2d4a49a4d89c6f67eb (patch)
tree56df58c192ba5bedc0e5a16cba6c1ccf1a7365ec /gcc/cp/error.c
parenta3454130760bf51b76495663c60ac6dffbe3d130 (diff)
downloadgcc-1e2d8575ace4e12dbe95ae2d4a49a4d89c6f67eb.zip
gcc-1e2d8575ace4e12dbe95ae2d4a49a4d89c6f67eb.tar.gz
gcc-1e2d8575ace4e12dbe95ae2d4a49a4d89c6f67eb.tar.bz2
Additional small changes to support opaque modes
After building some larger codes using opaque types and some c++ codes using opaque types it became clear I needed to go through and look for places where opaque types and modes needed to be handled. A whole pile of one-liners. gcc/ * typeclass.h: Add opaque_type_class. * builtins.c (type_to_class): Identify opaque type class. * dwarf2out.c (is_base_type): Handle opaque types. (gen_type_die_with_usage): Handle opaque types. * expr.c (count_type_elements): Opaque types should never have initializers. * ipa-devirt.c (odr_types_equivalent_p): No type-specific handling for opaque types is needed as it eventually checks the underlying mode which is what is important. * tree-streamer.c (record_common_node): Handle opaque types. * tree.c (type_contains_placeholder_1): Handle opaque types. (type_cache_hasher::equal): No additional comparison needed for opaque types. gcc/c-family * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Treat opaque types like other types. (c_pretty_printer::direct_abstract_declarator): Opaque types are supported types. gcc/c * c-aux-info.c (gen_type): Support opaque types. gcc/cp * error.c (dump_type): Handle opaque types. (dump_type_prefix): Handle opaque types. (dump_type_suffix): Handle opaque types. (dump_expr): Handle opaque types. * pt.c (tsubst): Allow opaque types in templates. (unify): Allow opaque types in templates. * typeck.c (structural_comptypes): Handle comparison of opaque types.
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 396558b..d27545d 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -529,6 +529,7 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags)
case INTEGER_TYPE:
case REAL_TYPE:
case VOID_TYPE:
+ case OPAQUE_TYPE:
case BOOLEAN_TYPE:
case COMPLEX_TYPE:
case VECTOR_TYPE:
@@ -874,6 +875,7 @@ dump_type_prefix (cxx_pretty_printer *pp, tree t, int flags)
case UNION_TYPE:
case LANG_TYPE:
case VOID_TYPE:
+ case OPAQUE_TYPE:
case TYPENAME_TYPE:
case COMPLEX_TYPE:
case VECTOR_TYPE:
@@ -997,6 +999,7 @@ dump_type_suffix (cxx_pretty_printer *pp, tree t, int flags)
case UNION_TYPE:
case LANG_TYPE:
case VOID_TYPE:
+ case OPAQUE_TYPE:
case TYPENAME_TYPE:
case COMPLEX_TYPE:
case VECTOR_TYPE:
@@ -2810,6 +2813,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
case ENUMERAL_TYPE:
case REAL_TYPE:
case VOID_TYPE:
+ case OPAQUE_TYPE:
case BOOLEAN_TYPE:
case INTEGER_TYPE:
case COMPLEX_TYPE: