From: Giuliano Procida Date: Fri, 19 Jun 2020 16:39:23 +0000 (+0100) Subject: abg-ir.cc: Remove unused re_canonicalize function. X-Git-Tag: libabigail-1.8~77 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=401e3cded94d4fdc0690b58f67d7e1008e125fce;p=libabigail.git abg-ir.cc: Remove unused re_canonicalize function. The function re_canonicalize was added in commit: 286cadf8 Bug 24430 - Fold away const for array types but later rendered obsolete by commit: 5d6af8d5 Delay canonicalization for array and qualified types This commit removes the function and its associated declarations. * include/abg-fwd.h (re_canonicalize): Remove declaration of obsolete function. * include/abg-ir.h (class {decl_base, type_base}): Remove re_canonicalize friend declarations from these classes. * src/abg-ir.cc (re_canonicalize): Remove obsolete function. Signed-off-by: Giuliano Procida --- diff --git a/include/abg-fwd.h b/include/abg-fwd.h index 999b071b..f23f4a46 100644 --- a/include/abg-fwd.h +++ b/include/abg-fwd.h @@ -1280,9 +1280,6 @@ type_or_void(const type_base_sptr, const environment*); type_base_sptr canonicalize(type_base_sptr); -type_base_sptr -re_canonicalize(type_base_sptr); - type_base* type_has_non_canonicalized_subtype(type_base_sptr t); diff --git a/include/abg-ir.h b/include/abg-ir.h index 9f49f913..c2b66c4c 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -1556,9 +1556,6 @@ public: friend type_base_sptr canonicalize(type_base_sptr); - friend type_base_sptr - re_canonicalize(type_base_sptr); - friend bool equals(const decl_base&, const decl_base&, change_kind*); @@ -1823,8 +1820,6 @@ public: friend type_base_sptr canonicalize(type_base_sptr); - friend type_base_sptr re_canonicalize(type_base_sptr); - type_base_sptr get_canonical_type() const; diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 37f6bbdf..a434ec69 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -12079,22 +12079,6 @@ canonicalize(type_base_sptr t) return canonical; } -/// Re-compute the canonical type of a type which already has one. -/// -/// This does what @ref canonicalize does, but clears out the -/// previously computed canonical type first. -/// -/// @param t the type to compute the canonical type for. -/// -/// @return the newly computed canonical type. -type_base_sptr -re_canonicalize(type_base_sptr t) -{ - t->priv_->canonical_type.reset(); - t->priv_->naked_canonical_type = 0; - return canonicalize(t); -} - /// The constructor of @ref type_base. /// /// @param s the size of the type, in bits.