From dba6798d128c2c444c13abc313c3a367dbd63a11 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 12 Jun 2022 18:08:32 +0200 Subject: [PATCH] Remove unused `PExpr::is_the_same()` The last user of the `PExpr::is_the_same()` method was removed in commit 37b60a4c52a4 ("Clean up interface of the PWire class"). Remove the method. Signed-off-by: Lars-Peter Clausen --- PExpr.cc | 14 -------------- PExpr.h | 7 ------- 2 files changed, 21 deletions(-) diff --git a/PExpr.cc b/PExpr.cc index 675eb1990..61b065590 100644 --- a/PExpr.cc +++ b/PExpr.cc @@ -53,11 +53,6 @@ bool PExpr::has_aa_term(Design*, NetScope*) const return false; } -bool PExpr::is_the_same(const PExpr*that) const -{ - return typeid(this) == typeid(that); -} - NetNet* PExpr::elaborate_lnet(Design*, NetScope*) const { cerr << get_fileline() << ": error: " @@ -514,15 +509,6 @@ const verinum& PENumber::value() const return *value_; } -bool PENumber::is_the_same(const PExpr*that) const -{ - const PENumber*obj = dynamic_cast(that); - if (obj == 0) - return false; - - return *value_ == *obj->value_; -} - PEString::PEString(char*s) : text_(s) { diff --git a/PExpr.h b/PExpr.h index a57a69bb4..2b5abdde8 100644 --- a/PExpr.h +++ b/PExpr.h @@ -180,11 +180,6 @@ class PExpr : public LineInfo { virtual bool is_collapsible_net(Design*des, NetScope*scope, NetNet::PortType port_type) const; - // This method returns true if that expression is the same as - // this expression. This method is used for comparing - // expressions that must be structurally "identical". - virtual bool is_the_same(const PExpr*that) const; - protected: unsigned fix_width_(width_mode_t mode); @@ -639,8 +634,6 @@ class PENumber : public PExpr { bool is_cassign, bool is_force) const; - virtual bool is_the_same(const PExpr*that) const; - private: verinum*const value_; };