summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2016-10-07 15:26:30 +0200
committerDodji Seketeli <dodji@redhat.com>2016-10-10 12:57:12 +0200
commit8bb9d3aedcecea74afa34e2a366dd1f73842cdb6 (patch)
treea28be6e9d30e794ef134c2312085ed6bccb5486e
parentApply ODR-based type comparison optimization to function types (diff)
downloadlibabigail-8bb9d3aedcecea74afa34e2a366dd1f73842cdb6.tar.gz
libabigail-8bb9d3aedcecea74afa34e2a366dd1f73842cdb6.tar.bz2
libabigail-8bb9d3aedcecea74afa34e2a366dd1f73842cdb6.tar.xz
Cleanup class_decl inifite comparison detection
We recently used a new type interned_string_set_type to detect infinite comparison of function_type type. This patch uses the same type for class_decl infinite comparison detection. * src/abg-ir.cc (environment::priv::classes_being_compared_): Make this use the new interned_string_set_type type. (class_decl::priv::{mark_as_being_compared, comparison_started}): Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
-rw-r--r--src/abg-ir.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index f421265a..4fec0184 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -2042,7 +2042,7 @@ struct environment::priv
2042 canonical_types_map_type canonical_types_; 2042 canonical_types_map_type canonical_types_;
2043 type_decl_sptr void_type_decl_; 2043 type_decl_sptr void_type_decl_;
2044 type_decl_sptr variadic_marker_type_decl_; 2044 type_decl_sptr variadic_marker_type_decl_;
2045 interned_string_bool_map_type classes_being_compared_; 2045 interned_string_set_type classes_being_compared_;
2046 interned_string_set_type fn_types_being_compared_; 2046 interned_string_set_type fn_types_being_compared_;
2047 vector<type_base_sptr> extra_live_types_; 2047 vector<type_base_sptr> extra_live_types_;
2048 interned_string_pool string_pool_; 2048 interned_string_pool string_pool_;
@@ -12245,7 +12245,7 @@ struct class_decl::priv
12245 { 12245 {
12246 const environment* env = klass.get_environment(); 12246 const environment* env = klass.get_environment();
12247 assert(env); 12247 assert(env);
12248 env->priv_->classes_being_compared_[klass.get_qualified_name()] = true; 12248 env->priv_->classes_being_compared_.insert(klass.get_qualified_name());
12249 } 12249 }
12250 12250
12251 /// Mark a class as being currently compared using the class_decl== 12251 /// Mark a class as being currently compared using the class_decl==
@@ -12318,7 +12318,7 @@ struct class_decl::priv
12318 { 12318 {
12319 const environment* env = klass.get_environment(); 12319 const environment* env = klass.get_environment();
12320 assert(env); 12320 assert(env);
12321 interned_string_bool_map_type& c = env->priv_->classes_being_compared_; 12321 interned_string_set_type& c = env->priv_->classes_being_compared_;
12322 return (c.find(klass.get_qualified_name()) != c.end()); 12322 return (c.find(klass.get_qualified_name()) != c.end());
12323 } 12323 }
12324 12324