Make TVariable type immutable
This enables using constexpr types for built-in variables and some of
the variables created in AST transformations.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Ie85b3c9872a071a7c023ced013b14ad91cff7cee
Reviewed-on: https://chromium-review.googlesource.com/868134
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index 1c88a73..354f6fe 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -193,7 +193,7 @@
// is not needed in the AST.
bool executeInitializer(const TSourceLoc &line,
const TString &identifier,
- TType type,
+ TType *type,
TIntermTyped *initializer,
TIntermBinary **initNode);
TIntermNode *addConditionInitializer(const TPublicType &pType,
@@ -471,7 +471,7 @@
bool declareVariable(const TSourceLoc &line,
const TString &identifier,
- const TType &type,
+ const TType *type,
TVariable **variable);
void checkCanBeDeclaredWithoutInitializer(const TSourceLoc &line,