]> sourceware.org Git - libabigail.git/commitdiff
Do not overly canonicalize types during typedef stripping
authorDodji Seketeli <dodji@redhat.com>
Fri, 2 Oct 2015 15:59:52 +0000 (17:59 +0200)
committerDodji Seketeli <dodji@redhat.com>
Sun, 4 Oct 2015 11:51:25 +0000 (13:51 +0200)
strip_typedef() canonicalizes the stripped typed, even if the input
type was not canonicalized.  This can lead to early canonicalization
that is not warranted.  For instance, is_compatible_with_class_type()
calls strip_typedef() and can be called during DWARF reading on types
that haven't been canonicalized yet; this was triggering a
canonicalization what was happening too early.

With this patch, strip_typedef() does not canonicalize a stripped type
if the input type wasn't itself canonicalized.

* src/abg-ir.cc (strip_typedef): Do not canonicalize the stripped
type if the input one is not canonicalized.

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

index d4b4405e46038e3e242d40ded03ec520ca59412a..314ff11cf6d554cd5772410a4b23df4d19f57405 100644 (file)
@@ -3107,7 +3107,7 @@ strip_typedef(const type_base_sptr type)
   if (!t->get_environment())
     set_environment_for_artifact(t, env);
 
-  if (!canonicalize(t))
+  if (!(type->get_canonical_type() && canonicalize(t)))
     keep_type_alive(t);
 
   return t->get_canonical_type() ? t->get_canonical_type() : t;
This page took 0.043934 seconds and 5 git commands to generate.