[2/4] ir: Don't cache internal name of non-canonicalized function types
Commit Message
When a function type is not yet canonicalized, do not cache its name,
otherwise, the name can capture the state of the function in a too
early state.
* src/abg-ir.cc (function_type::get_cached_name): Do not cache
internal name for non-canonicalized function types.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
src/abg-ir.cc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
@@ -21633,9 +21633,8 @@ function_type::get_cached_name(bool internal) const
}
else
{
- if (priv_->temp_internal_cached_name_.empty())
- priv_->temp_internal_cached_name_ =
- get_function_type_name(this, /*internal=*/true);
+ priv_->temp_internal_cached_name_ =
+ get_function_type_name(this, /*internal=*/true);
return priv_->temp_internal_cached_name_;
}
}