Commit 9bf706aa by Iain Buclaw

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

From-SVN: r272349
parent af1b88ee
c6887d9bbbe7b68e03ba3bccbf61432c1b369386
9746504883fc64f3dcec0cd4cacbb7a372d52158
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
......@@ -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());
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment