From: ibuclaw Date: Sun, 16 Jun 2019 07:49:54 +0000 (+0000) Subject: d/dmd: Merge upstream dmd 974650488 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe275d8df5b5eb224de253f225ca898be2bfff48;p=thirdparty%2Fgcc.git d/dmd: Merge upstream dmd 974650488 Adds static function VarDeclaration::create to the dmd C++ interface. Reviewed-on: https://github.com/dlang/dmd/pull/10008 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272349 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 3e3e718c11b2..03005e3b1ce9 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -c6887d9bbbe7b68e03ba3bccbf61432c1b369386 +9746504883fc64f3dcec0cd4cacbb7a372d52158 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/declaration.c b/gcc/d/dmd/declaration.c index d0911e218582..2a054306347e 100644 --- a/gcc/d/dmd/declaration.c +++ b/gcc/d/dmd/declaration.c @@ -830,6 +830,11 @@ VarDeclaration::VarDeclaration(Loc loc, Type *type, Identifier *id, Initializer this->sequenceNumber = ++nextSequenceNumber; } +VarDeclaration *VarDeclaration::create(Loc loc, Type *type, Identifier *id, Initializer *init) +{ + return new VarDeclaration(loc, type, id, init); +} + Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s) { //printf("VarDeclaration::syntaxCopy(%s)\n", toChars()); diff --git a/gcc/d/dmd/declaration.h b/gcc/d/dmd/declaration.h index 16da7ea8428e..e3444a70fd84 100644 --- a/gcc/d/dmd/declaration.h +++ b/gcc/d/dmd/declaration.h @@ -265,6 +265,7 @@ public: IntRange *range; // if !NULL, the variable is known to be within the range VarDeclaration(Loc loc, Type *t, Identifier *id, Initializer *init); + static VarDeclaration *create(Loc loc, Type *t, Identifier *id, Initializer *init); Dsymbol *syntaxCopy(Dsymbol *); void semantic(Scope *sc); void setFieldOffset(AggregateDeclaration *ad, unsigned *poffset, bool isunion);