Fix strip_typedef issues
authorDodji Seketeli <dodji@redhat.com>
Wed, 14 Oct 2015 11:34:35 +0000 (13:34 +0200)
committerDodji Seketeli <dodji@redhat.com>
Thu, 15 Oct 2015 11:50:48 +0000 (13:50 +0200)
commit7b783500d78cb7e8692a2e1d4a396fc07b5a92d2
tree4c32ea4af807b80eec3c4e8d1d145c9f82a94da3
parent832e6b636631a6137d1aa395eb095e02837ba3eb
Fix strip_typedef issues

strip_typedef currently has at least two issues.  First, it was
triggering a potentially wrong early canonicalization.  Second, it was
asserting too eagerly that a return type should not be nil; the truth
is that there can be a short period of time where a function has an
empty result type; that is usually during the building of said
function type, before the return type is fully built.

This patch addresses those two issues.

* src/abg-ir.cc (strip_typedef): Do not canonicalize
the return type of the method type to typedef-strip.
Acknowledge that the return type can be nil.

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