[1/2] abg-ir.cc: Remove unused re_canonicalize function.

Message ID 20200619163924.207852-2-gprocida@google.com
State Committed
Headers
Series Type identity clean-ups |

Commit Message

Giuliano Procida June 19, 2020, 4:39 p.m. UTC
  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 <gprocida@google.com>
---
 include/abg-fwd.h |  3 ---
 include/abg-ir.h  |  5 -----
 src/abg-ir.cc     | 16 ----------------
 3 files changed, 24 deletions(-)
  

Comments

Dodji Seketeli July 7, 2020, 2:48 p.m. UTC | #1
Giuliano Procida <gprocida@google.com> a écrit:

> 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 <gprocida@google.com>

Applied to master, thanks!

Cheers,
  

Patch

diff --git a/include/abg-fwd.h b/include/abg-fwd.h
index f6e0c5b2..fc94c007 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 d81de217..f71f60a9 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 da3716d5..c6712a83 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -12075,22 +12075,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.