mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-22 16:56:57 +00:00
ir: Improve the checks done by 'abidw --debug-tc'
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>
This commit is contained in:
parent
4cea6708d6
commit
83f611b5f7
@ -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: "
|
||||
|
Loading…
Reference in New Issue
Block a user