From patchwork Fri Jun 19 16:39:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 39691 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53BDD386F80C; Fri, 19 Jun 2020 16:39:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53BDD386F80C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1592584778; bh=VSHN0CHY781GPw4xFAjRyOYtaRYrXWeRKfT9M7x/vik=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=KQPzi2jS9MjgEeJL0DbWWiQGba8B6268g0byU6H/3Ty2bm9gLW9cM9YkGmFfytSPc GMegM9GxNBjbSc4G4VMaR3At7Y4Wri0BWrXBzFrVL/1+2/3yyQPgaIRDKeNDsDi6UG J16r7iccKzWIyZK5z308j2j0lWanDo+D4TRSo9mg= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by sourceware.org (Postfix) with ESMTPS id 0879B3851C20 for ; Fri, 19 Jun 2020 16:39:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0879B3851C20 Received: by mail-qv1-xf49.google.com with SMTP id a4so7148694qvl.18 for ; Fri, 19 Jun 2020 09:39:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=VSHN0CHY781GPw4xFAjRyOYtaRYrXWeRKfT9M7x/vik=; b=f2r0xRpvWVtED+8AuvX0rpvxJwO9ukhszfDHx5tcejHJFOzUUzwxHtDgElY32BLpd3 2GBzK9zz9CqwIadtPrMooPsmenKS1+on0Y8tK8KH6p8nfXwwzvnIFK7ye5FlqZuo9+td N9aZLlHfUneMUW7aC61WU5tay0CIqReRvJ7o+du3VGi8GshMA2n7MjY9Mlzyhw6cdKh1 RYu2KJRFp+hhpTi/f9LBz0u4qG9uDqCbv5t38fApupAJ8uNP9A/TlhvT6CQEYQkD6cBw 1uCCfS5EzPfI1VErb2jG9QAxBRNwT0wX+8ZTXlrZnuKshZV4P+AaHqx89KC2j5hQOWLp waCw== X-Gm-Message-State: AOAM531izShEtVushaOsMyeIzTZU5TmZNvWxmsLMwpFTwiFXD/6eoBw0 HO+TL0Z4yksQMX2E0o9/89o7CdWaqDsHwVG21HJBC1A8YoeVmhG1V0PFA4HohOntZqpdUX+NOjD rARIgKp8xlRB85qufU1LQcD09F6vJnKX/4zmsokwphaLAfa6/h2FsGA3xKFpsIj+sw6m4e5g= X-Google-Smtp-Source: ABdhPJwHFnI5BIgJ+6komdPLx3n9/yiJsKunJ2sDPiSiawadPXYICUEuebVTEiRxVGhRyVntL33+DMyzLIkgdw== X-Received: by 2002:a05:6214:6a1:: with SMTP id s1mr9667230qvz.46.1592584775433; Fri, 19 Jun 2020 09:39:35 -0700 (PDT) Date: Fri, 19 Jun 2020 17:39:23 +0100 In-Reply-To: <20200619163924.207852-1-gprocida@google.com> Message-Id: <20200619163924.207852-2-gprocida@google.com> Mime-Version: 1.0 References: <20200619163924.207852-1-gprocida@google.com> X-Mailer: git-send-email 2.27.0.111.gc72c7da667-goog Subject: [PATCH 1/2] abg-ir.cc: Remove unused re_canonicalize function. To: libabigail@sourceware.org X-Spam-Status: No, score=-23.3 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Giuliano Procida via Libabigail From: Giuliano Procida Reply-To: Giuliano Procida Cc: maennich@google.com, kernel-team@android.com, gprocida@google.com Errors-To: libabigail-bounces@sourceware.org Sender: "Libabigail" 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 --- include/abg-fwd.h | 3 --- include/abg-ir.h | 5 ----- src/abg-ir.cc | 16 ---------------- 3 files changed, 24 deletions(-) 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.