Don't cache type qualified name before canonicalization
Caching the qualified name of a given type has always been subject to
subtle bugs. If the qualified name is queried (so it's computed)
before the type is added into its final content, then what is cached
is a non-qualified type name. Later when the type is finally added to
its context, querying its qualified name will just yield the cached
non-qualified name. And that has impact on hashing and comparison.
We needed a way to signal that the type is "fully built and added to
its final context". When the type is fully built then we can cache
its qualified name.
This patch uses the presence of the canonical type as the signal; if
the canonical type is present then the type is fully built and added
to its final context. And then at that point the cached qualified
name is used.
Note that this patch is the first of a series fixing several things
that influence hashing, comparison, the reading and writing of abixml.
It's only at the end of the series that an update to regression tests
is provided. In between, some patches of the series are going to
"break" the regression tests. That is fine.
* src/abg-ir.cc (decl_base::{get_qualified_parent_name,
get_qualified_name}): Use the qualified name cache only if the
type is fully built, i.e, when its canonical type is present.
(qualified_type_def::get_qualified_name): Likewise.
(pointer_type_def::get_qualified_name): Likewise.
(reference_type_def::get_qualified_name): Likewise.
(array_type_def::get_qualified_name): Likewise.