[PATCH 2/4] ir: Don't cache internal name of non-canonicalized function types

Dodji Seketeli dodji@redhat.com
Sat Aug 17 12:00:24 GMT 2024


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(-)

diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index bc23254a..873f3750 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -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_;
 	}
     }
-- 
2.43.5



More information about the Libabigail mailing list