From patchwork Wed Aug 14 12:56:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 95814 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 D1A0A385842C for ; Wed, 14 Aug 2024 12:57:01 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by sourceware.org (Postfix) with ESMTPS id 60DAB3858C60 for ; Wed, 14 Aug 2024 12:56:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 60DAB3858C60 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 60DAB3858C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.70.183.196 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723640213; cv=none; b=NOl2wR2TpBksk0i7rKca+yvupKaDt+x++Ni5GkGro9opub9a2NthuvW/8nMLT5T+wy1uaxF+Nhir8SZJVT/ycJ7Z3TCoXnZbt6y8Ci+0EOE3t9JAMOb68be/cqf4kSZLg2t4joK5nM7UurQCY//fb/II04HkwBUALfnTC0ZlOY8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723640213; c=relaxed/simple; bh=NgiURG8m3zyQcrPu0J80+mHyBRTD7ukvvt79/K02pjs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=iAorTv20EbWV0UmhbX3QJ957Ch6LzGE9oLXESD2udfODMZZCy2Gy+RSkir+5tNK0ZWdnEGkTorgeycij2U27HHciBKe9+kyScn3BTB/gXFQenuT93TopqiH7hBIabBLOxp7h6LCw9ia06Y2Wlaalv3RCzTuvjcbkDQ7j7liQy2I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail.gandi.net (Postfix) with ESMTPSA id 0C21BE0006; Wed, 14 Aug 2024 12:56:49 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 2A811507A626; Wed, 14 Aug 2024 14:56:49 +0200 (CEST) From: dodji@redhat.com To: libabigail@sourceware.org Cc: dodji@redhat.com Subject: [PATCH 04/11] ir: Make odr_is_relevant support support artifacts with no TU set yet Date: Wed, 14 Aug 2024 14:56:42 +0200 Message-ID: <20240814125649.47119-4-dodji@redhat.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20240814125649.47119-1-dodji@redhat.com> References: <20240814125649.47119-1-dodji@redhat.com> MIME-Version: 1.0 X-GND-Sasl: dodj@seketeli.org X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org From: Dodji Seketeli * src/abg-ir.cc (odr_is_relevant): Consider that an artifact with no associated TU is not relevant for ODR considerations. Signed-off-by: Dodji Seketeli --- src/abg-ir.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 7d8de813..9dcdc1c7 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -10070,6 +10070,9 @@ debug_comp_stack(const environment& env) bool odr_is_relevant(const type_or_decl_base& artifact) { + if (!artifact.get_translation_unit()) + return false; + translation_unit::language l = artifact.get_translation_unit()->get_language();