Set proper symbol ids on temporary symbol nodes

Temporary symbols used to all have symbol id 0. Now they get assigned
unique symbol ids. This makes it possible to keep track of them
according to the symbol id instead of their name, paving way to more
robust AST handling in the future.

BUG=angleproject:1490
TEST=angle_unittests

Change-Id: I292e2e483cc39173524fd30a30b48c4c808442e5
Reviewed-on: https://chromium-review.googlesource.com/559335
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/SimplifyLoopConditions.cpp b/src/compiler/translator/SimplifyLoopConditions.cpp
index 2e40a76..61d69e5 100644
--- a/src/compiler/translator/SimplifyLoopConditions.cpp
+++ b/src/compiler/translator/SimplifyLoopConditions.cpp
@@ -146,7 +146,7 @@
 
     if (mFoundLoopToChange)
     {
-        nextTemporaryIndex();
+        nextTemporaryId();
 
         // Replace the loop condition with a boolean variable that's updated on each iteration.
         TLoopType loopType = node->getType();
@@ -284,13 +284,13 @@
 
 void SimplifyLoopConditions(TIntermNode *root,
                             unsigned int conditionsToSimplifyMask,
-                            unsigned int *temporaryIndex,
+                            TSymbolUniqueId *temporaryId,
                             const TSymbolTable &symbolTable,
                             int shaderVersion)
 {
     SimplifyLoopConditionsTraverser traverser(conditionsToSimplifyMask, symbolTable, shaderVersion);
-    ASSERT(temporaryIndex != nullptr);
-    traverser.useTemporaryIndex(temporaryIndex);
+    ASSERT(temporaryId != nullptr);
+    traverser.useTemporaryId(temporaryId);
     root->traverse(&traverser);
     traverser.updateTree();
 }