Message ID | 20220825114856.3137373-3-gprocida@google.com |
---|---|
State | New |
Headers |
Return-Path: <libabigail-bounces+patchwork=sourceware.org@sourceware.org> 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 00C07385ED4D for <patchwork@sourceware.org>; Thu, 25 Aug 2022 11:49:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00C07385ED4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1661428155; bh=ZoMIj64FRagNqtHpdrSgYUEYNvqT2i/z5SFVhm7Ii2g=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=EFTTjKp2xj6dIKQVuqS5VHXk2ktJzTT2AoQ52tyf56GvMb94NFSjooTx1opGFR22g QnnGtb5fZikAMgcfWCtMRQGupdvME7l6N4tGziYvZW+2bHQPzs98wqMYQrmLwsT6ar D258qzQn94w/TeGn/yL/CT8iESLeWdlWkQ+chHok= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-ed1-x549.google.com (mail-ed1-x549.google.com [IPv6:2a00:1450:4864:20::549]) by sourceware.org (Postfix) with ESMTPS id DA3C9385415D for <libabigail@sourceware.org>; Thu, 25 Aug 2022 11:49:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA3C9385415D Received: by mail-ed1-x549.google.com with SMTP id y14-20020a056402440e00b0044301c7ccd9so12666329eda.19 for <libabigail@sourceware.org>; Thu, 25 Aug 2022 04:49:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc; bh=ZoMIj64FRagNqtHpdrSgYUEYNvqT2i/z5SFVhm7Ii2g=; b=HAprR8N7zZFEbKEni+ioaEfIjw+eVFeyV5+proQTzgHShf/1frh4zF9YUlkhR4QlHa PGXBZss/DSiuDBqoUvPwqokis/7IXO5x++C3bG2sVSjWGjwd0FQf1fF3GkmBtn7Jj8uR VLKBSjpNzyKy749KLZelFtzWzJtIJf+bNy4WkUh89sNFp83eXeXQ8fxjfkIL3+QUIwnL 5qrE1a07IrKbpnqitcgXd5CNdWK17pg8EiZXKGL75dgP0+IxnzyOlC1AguuyqLuZXMJG 9fLGG7iVkUmBEnO+DdjCqqL2V69mvfraARkcdwKz8PmYFjP4/WdTLUDgD9V4T3n/32Ho V4jQ== X-Gm-Message-State: ACgBeo0+x/659tCQW5nhr+Rz/IGEF+LoqIW6fLN+aeJCmFDB9lLghgg6 vP57p6f3Di8zjWwi5D5/vBBZDe+cuHNiiRxhCGJ2xcPUvFBNI1kaYZcfX61ty10htfE1l+g1BNt W0sOqqkWUr90MyCd1D6afYf1mpt84go/yOdhs40ffHsm+iYObP+SEuuFgCCSF+lXnwYffLSs= X-Google-Smtp-Source: AA6agR5agjcN2JMfWzo3gA1V+ENliZbz9H1kNWRskF/X26IROAufAD44awO8rTDad0qcHf0AIb9dyDfKFvb+Wg== X-Received: from tef.lon.corp.google.com ([2a00:79e0:d:209:e2f1:457f:d595:4f88]) (user=gprocida job=sendgmr) by 2002:a05:6402:35d4:b0:446:88da:9bd5 with SMTP id z20-20020a05640235d400b0044688da9bd5mr2884493edc.415.1661428149688; Thu, 25 Aug 2022 04:49:09 -0700 (PDT) Date: Thu, 25 Aug 2022 12:48:55 +0100 In-Reply-To: <20220825114856.3137373-1-gprocida@google.com> Message-Id: <20220825114856.3137373-3-gprocida@google.com> Mime-Version: 1.0 References: <20220825114856.3137373-1-gprocida@google.com> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog Subject: [PATCH 2/3] abidw: remove always true test in resolve_declaration_only_classes To: libabigail@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-21.4 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, T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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 <libabigail.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libabigail>, <mailto:libabigail-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libabigail/> List-Help: <mailto:libabigail-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libabigail>, <mailto:libabigail-request@sourceware.org?subject=subscribe> From: Giuliano Procida via Libabigail <libabigail@sourceware.org> Reply-To: Giuliano Procida <gprocida@google.com> Cc: maennich@google.com, vvvvvv@google.com, sidnayyar@google.com, dodji@seketeli.org, kernel-team@android.com Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" <libabigail-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Improve resolution of declaration-only enums
|
|
Commit Message
Giuliano Procida
Aug. 25, 2022, 11:48 a.m. UTC
The code that makes the last attempt to resolve declaration-only types
was protected by a conditional checking that the number of TUs for a
given type was more than 1. The previous branch checked for exactly 1.
However, the entire block is inside a conditional where the number of
TUs is guaranteed to be greater than 0.
Removing the conditional makes it clear that this branch handles all
remaining cases.
* src/abg-dwarf-reader.cc
(read_context::resolve_declaration_only_classes): Remove
tautological conditional.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
src/abg-dwarf-reader.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Giuliano Procida <gprocida@google.com> a écrit: > The code that makes the last attempt to resolve declaration-only types > was protected by a conditional checking that the number of TUs for a > given type was more than 1. The previous branch checked for exactly 1. > However, the entire block is inside a conditional where the number of > TUs is guaranteed to be greater than 0. > > Removing the conditional makes it clear that this branch handles all > remaining cases. > > * src/abg-dwarf-reader.cc > (read_context::resolve_declaration_only_classes): Remove > tautological conditional. > > Signed-off-by: Giuliano Procida <gprocida@google.com> Applied to master, thanks ! [...] Cheers,
diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index a954de6d..b5e60e35 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -4274,7 +4274,7 @@ public: else if (per_tu_class_map.size() == 1) (*j)->set_definition_of_declaration (per_tu_class_map.begin()->second); - else if (per_tu_class_map.size() > 1) + else { // We are in case where there are more than // one definition for the declaration. Let's