Commit 77f4fb57 by Iain Buclaw

d/dmd: Merge upstream dmd 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.

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

From-SVN: r270300
parent f75c823e
d7ed327edb0b01ad56e7e73e77b3401cd565675e c185f9df1789456c7d88d047f2df23dd784f1182
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository. merge done from the dlang/dmd repository.
...@@ -39,6 +39,7 @@ public: ...@@ -39,6 +39,7 @@ public:
virtual Condition *syntaxCopy() = 0; virtual Condition *syntaxCopy() = 0;
virtual int include(Scope *sc, ScopeDsymbol *sds) = 0; virtual int include(Scope *sc, ScopeDsymbol *sds) = 0;
virtual DebugCondition *isDebugCondition() { return NULL; } virtual DebugCondition *isDebugCondition() { return NULL; }
virtual VersionCondition *isVersionCondition() { return NULL; }
virtual void accept(Visitor *v) { v->visit(this); } virtual void accept(Visitor *v) { v->visit(this); }
}; };
...@@ -91,6 +92,7 @@ public: ...@@ -91,6 +92,7 @@ public:
VersionCondition(Module *mod, unsigned level, Identifier *ident); VersionCondition(Module *mod, unsigned level, Identifier *ident);
int include(Scope *sc, ScopeDsymbol *sds); int include(Scope *sc, ScopeDsymbol *sds);
VersionCondition *isVersionCondition() { return this; }
void accept(Visitor *v) { v->visit(this); } void accept(Visitor *v) { v->visit(this); }
}; };
......
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