From patchwork Thu Jul 8 13:50:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 1502287 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=adacore-com.20150623.gappssmtp.com header.i=@adacore-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=0lHpBor+; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GLHv23qmmz9sXL for ; Thu, 8 Jul 2021 23:58:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AA28B399C022 for ; Thu, 8 Jul 2021 13:58:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 937683939C24 for ; Thu, 8 Jul 2021 13:50:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 937683939C24 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-lf1-x129.google.com with SMTP id a18so15754174lfs.10 for ; Thu, 08 Jul 2021 06:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=ndKxu9DQuxu4iJoFk6Napq8oUA+jEO3F67YnhRL3yDg=; b=0lHpBor+i4QlXLO5DDPQStJUf40CyIUtcW2WWfVWCsxhr9pK0wi582DpC0+zmf/THu 1cKHUmXCJyKWbNsMOAo2J8srnERTG6XRXXFvyce+Z5ah4wFv6JTVA6RqFdf8FBpb1HXP 59Ul4xZbrNAjo4GRkAe/pG5Bb8GWShcrVkKOudKfDGJHmJplT0WTH3AoGrH86EWDCDJn m2hsFLKmIdd/B1KQOFz2ad/NsLmah4DLnKIUKBvzUBttBCj5BPmkVRFKxYIhNyb3PXRc EVWyHUn7VoUK2ijasv7rY4/4lOAa3DXSwufSfoUyM1nCa1jY5tPJiaGJHEvNvActM+yC 7Jew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=ndKxu9DQuxu4iJoFk6Napq8oUA+jEO3F67YnhRL3yDg=; b=f3gMALMa/TAQDH+fritbqk4eaziShj5k56YWabTv5QHS8JwIzNBL4Hsu0MBTBVmO4m ZWvKZqpwO1xa/v8J1ajVukmL0bKNLwCcKvO1OWL5Zydpwl831qkX9BmcOstPi1twFJ/k //eJxc4Fre3DyAbSJYLUDMWjNtoFlODZRD8xj2MGuSIfedQB65gfsGxQf+qN7KICWEdQ 8tRms7BQwMwKeqoRpL1/s2MVs4hPzclyqDF0KEgBrvTmzQ9tyfCpyXFKI29LO9RWKqow bKz0xVc1Qktl3p7/hJ0GJiw6aeigz39hScXHHrtGfB9rK2JMOpp9EpdjxywraonLF4sU 1XMg== X-Gm-Message-State: AOAM5331mQf/kebDc6MamnWTK8CbrMZFNhDUgDajf4v5SY6AcG20SfNI z7Qk3TbkwY8bce4aOQ1LxatthTtP3Z8zwA== X-Google-Smtp-Source: ABdhPJy5whxugsBZUKMVOOhwgg6Yq7nDkJCi4v7Ec1ZLwb2hhxFy3ThjhlhB1gDIir2BsmAqBuXX3A== X-Received: by 2002:a2e:535e:: with SMTP id t30mr17130571ljd.224.1625752220263; Thu, 08 Jul 2021 06:50:20 -0700 (PDT) Received: from adacore.com ([2a02:2ab8:224:2ce:72b5:e8ff:feef:ee60]) by smtp.gmail.com with ESMTPSA id v12sm237883ljv.65.2021.07.08.06.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 06:50:19 -0700 (PDT) Date: Thu, 8 Jul 2021 13:50:18 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Subject: [Ada] Replace low-level condition with a high-level call Message-ID: <20210708135018.GA2465762@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Piotr Trojanek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * lib-writ.adb (Ensure_System_Dependency): Simplify condition. diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb --- a/gcc/ada/lib-writ.adb +++ b/gcc/ada/lib-writ.adb @@ -147,7 +147,7 @@ package body Lib.Writ is begin -- Nothing to do if we already compiled System - if Unit_Names.Get (System_Uname) /= No_Unit then + if Is_Loaded (System_Uname) then return; end if;