]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d/dmd: Merge upstream dmd 974650488
authorIain Buclaw <ibuclaw@gcc.gnu.org>
Sun, 16 Jun 2019 07:49:54 +0000 (07:49 +0000)
committerIain Buclaw <ibuclaw@gcc.gnu.org>
Sun, 16 Jun 2019 07:49:54 +0000 (07:49 +0000)
Adds static function VarDeclaration::create to the dmd C++ interface.

Reviewed-on: https://github.com/dlang/dmd/pull/10008

From-SVN: r272349

gcc/d/dmd/MERGE
gcc/d/dmd/declaration.c
gcc/d/dmd/declaration.h

index 3e3e718c11b295fb3e52e661e7395ef340885ace..03005e3b1ce9afe37b80e3015a70e968526771bc 100644 (file)
@@ -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.
index d0911e21858207a848cd456d657486e0db41d7ae..2a054306347e60b3a16d367cc8170b643a90ff85 100644 (file)
@@ -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());
index 16da7ea8428e284fa319d5a9b968d2a452ba5816..e3444a70fd8484ff909ea79ea21bc28f090bf626 100644 (file)
@@ -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);