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/SimplifyLoopConditions.cpp b/src/compiler/translator/SimplifyLoopConditions.cpp
index c8f504a..4d47e05 100644
--- a/src/compiler/translator/SimplifyLoopConditions.cpp
+++ b/src/compiler/translator/SimplifyLoopConditions.cpp
@@ -13,6 +13,7 @@
 #include "compiler/translator/IntermNodePatternMatcher.h"
 #include "compiler/translator/IntermNode_util.h"
 #include "compiler/translator/IntermTraverse.h"
+#include "compiler/translator/StaticType.h"
 
 namespace sh
 {
@@ -151,7 +152,7 @@
 
     if (mFoundLoopToChange)
     {
-        TType boolType(EbtBool, EbpUndefined, EvqTemporary);
+        const TType *boolType        = StaticType::Get<EbtBool, EbpUndefined, EvqTemporary, 1, 1>();
         TVariable *conditionVariable = CreateTempVariable(mSymbolTable, boolType);
 
         // Replace the loop condition with a boolean variable that's updated on each iteration.