Delay canonicalization for array and qualified types
authorDodji Seketeli <dodji@redhat.com>
Thu, 18 Apr 2019 09:26:44 +0000 (11:26 +0200)
committerDodji Seketeli <dodji@redhat.com>
Thu, 18 Apr 2019 09:26:44 +0000 (11:26 +0200)
commit5d6af8d549fe9315ffb6d2c8a26b15795cee05b8
treefc119abe3f5f6c08a6cf6cb3a2710e1cf1b6c3d3
parenta074b48f33ff0c657d360575e7fa9f3dc9f3e569
Delay canonicalization for array and qualified types

Array and qualified types can be edited after they are built, e.g, to
fold the qualifiers of the array as those should always apply to the
element types of the array, at least in C and C++.  So we need to
delay the canonicalization of these types until *after* all that type
editing is done.  We were not doing that properly and I suspect this
is the cause of some "heisenregressions" we are seeing on some
platforms intermittently.

This patch does delay the type canonicalization and insures that we
don't edit types that are canonicalized already.

* src/abg-dwarf-reader.cc (maybe_canonicalize_type): Delay the
canonicalization of array and qualified types, just like what we
do for classes and function types already.
(maybe_strip_qualification):  Do not
re-canonicalize array and qualified types here because it should
not be necessary anymore.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-dwarf-reader.cc