From patchwork Fri Apr 12 06:27:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1084430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-499150-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=gdcproject.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="k8hj6NAu"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44gScL5Ncdz9s5c for ; Fri, 12 Apr 2019 16:27:28 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=C4CcJcklVxdKyVBwgo3gVJ5d9sNmbylKv5upqRl0jIc82R hrm85cqMplria3Fa/B19Cyg4n+asdqF1yauRaVWC56HDkLzyVzoPeTpeT3WPhCQo hE4NFzYYQZXIHR2DQWvayld4uiVoUSNAC/si7wA4SaaXgG0y6Q2rIO3q87AQI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=6KwFa81ngUDnQwnAol0H8vn5hgk=; b=k8hj6NAuS5gRXV+kHQOK rQ4rYy+6foGiw0cVhnahPz/GcZvIgX4OmDquvoPeq1f/lo1a5Lr1qzdHj9RItkRj A6s8aPC8U4rZoRNSm0h0SiCq7evcRxi8nw+tF4u0Vy2TF343FpsU/Gg6zlTs4m5q rTRTkUt8ugERoOcCXwEVL7M= Received: (qmail 15928 invoked by alias); 12 Apr 2019 06:27:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 15919 invoked by uid 89); 12 Apr 2019 06:27:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=visitor, visit X-HELO: mail-qt1-f175.google.com Received: from mail-qt1-f175.google.com (HELO mail-qt1-f175.google.com) (209.85.160.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Apr 2019 06:27:17 +0000 Received: by mail-qt1-f175.google.com with SMTP id v20so9967726qtv.12 for ; Thu, 11 Apr 2019 23:27:16 -0700 (PDT) MIME-Version: 1.0 From: Iain Buclaw Date: Fri, 12 Apr 2019 08:27:03 +0200 Message-ID: Subject: [PATCH, d] Committed merge with upstream dmd To: gcc-patches X-IsSubscribed: yes Hi, This patch merges the D front-end implementation with dmd upstream c185f9df1. Adds new virtual isVersionCondition, this is so that in the code generation pass, a ConditionDeclaration's condition can be identified without requiring a Visitor function. Bootstrapped and regression tested on x86_64-linux-gnu. Committed to trunk as r270300. diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 800be95e4e6..be0c5a50da2 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -d7ed327edb0b01ad56e7e73e77b3401cd565675e +c185f9df1789456c7d88d047f2df23dd784f1182 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/cond.h b/gcc/d/dmd/cond.h index 891969be48d..8e33b16a9da 100644 --- a/gcc/d/dmd/cond.h +++ b/gcc/d/dmd/cond.h @@ -39,6 +39,7 @@ public: virtual Condition *syntaxCopy() = 0; virtual int include(Scope *sc, ScopeDsymbol *sds) = 0; virtual DebugCondition *isDebugCondition() { return NULL; } + virtual VersionCondition *isVersionCondition() { return NULL; } virtual void accept(Visitor *v) { v->visit(this); } }; @@ -91,6 +92,7 @@ public: VersionCondition(Module *mod, unsigned level, Identifier *ident); int include(Scope *sc, ScopeDsymbol *sds); + VersionCondition *isVersionCondition() { return this; } void accept(Visitor *v) { v->visit(this); } };