[applied] ir: Improve the checks done by 'abidw --debug-tc'
Commit Message
Hello,
The abidw --debug-tc option (enabled by the
--enable-debug-type-canonicalization configure option) performs every
type comparison twice; once structurally and once canonically.
This patch improves that checking mode by disabling comparison result
caching. It makes things slower but it makes the checking more
reliable.
* src/abg-ir.cc (compare_types_during_canonicalization): Disable
type comparison result caching during type canonicalization
debugging.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
src/abg-ir.cc | 2 ++
1 file changed, 2 insertions(+)
@@ -15214,10 +15214,12 @@ compare_types_during_canonicalization(const type_base& canonical_type,
if (env.debug_type_canonicalization_is_on())
{
bool canonical_equality = false, structural_equality = false;
+ env.priv_->allow_type_comparison_results_caching(false);
env.priv_->use_canonical_type_comparison_ = false;
structural_equality = canonical_type == candidate_type;
env.priv_->use_canonical_type_comparison_ = true;
canonical_equality = canonical_type == candidate_type;
+ env.priv_->allow_type_comparison_results_caching(true);
if (canonical_equality != structural_equality)
{
std::cerr << "structural & canonical equality different for type: "