Additional small changes to support opaque modes
authorAaron Sawdey <acsawdey@linux.ibm.com>
Tue, 17 Nov 2020 23:17:44 +0000 (17:17 -0600)
committerAaron Sawdey <acsawdey@linux.ibm.com>
Sat, 21 Nov 2020 13:37:06 +0000 (07:37 -0600)
commit1e2d8575ace4e12dbe95ae2d4a49a4d89c6f67eb
tree56df58c192ba5bedc0e5a16cba6c1ccf1a7365ec
parenta3454130760bf51b76495663c60ac6dffbe3d130
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.
12 files changed:
gcc/builtins.c
gcc/c-family/c-pretty-print.c
gcc/c/c-aux-info.c
gcc/cp/error.c
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/dwarf2out.c
gcc/expr.c
gcc/ipa-devirt.c
gcc/tree-streamer.c
gcc/tree.c
gcc/typeclass.h