* src/abg-reader.cc (build_enum_type_decl): Detect a
declaration-only enum and flag it as such.
(build_type_decl): Support reading the "is-declaration" attribute.
(build_class_decl): Adjust.
* src/abg-writer.cc (write_is_declaration_only): Renamed
write_class_or_union_is_declaration_only into this.
(write_enum_is_declaration_only): Remove.
(write_type_decl, write_enum_type_decl)
(write_class_decl_opening_tag, write_union_decl_opening_tag): Use
write_is_declaration_only.
* tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.