Split TIntermInvariantDeclaration from TIntermAggregate

This change is pure refactoring and doesn't fix bugs related to
invariant declarations. Invariant declarations are supposed to accept
a list of identifiers, but this refactoring keeps the current behavior
of only accepting a single identifier in an invariant declaration.
When the bug will be fixed, the new TIntermInvariantDeclaration class
that now has only a single child node can be changed so that it may
have multiple children.

TIntermAggregate is still used for function calls, function
prototypes and function parameter lists.

BUG=angleproject:1490
TEST=angle_unittests

Change-Id: I3e22092c87e1c06445fd7e123d9922c2fcb59428
Reviewed-on: https://chromium-review.googlesource.com/419415
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/intermOut.cpp b/src/compiler/translator/intermOut.cpp
index 1959060..04c3730 100644
--- a/src/compiler/translator/intermOut.cpp
+++ b/src/compiler/translator/intermOut.cpp
@@ -52,6 +52,7 @@
     bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override;
     bool visitAggregate(Visit visit, TIntermAggregate *) override;
     bool visitBlock(Visit visit, TIntermBlock *) override;
+    bool visitInvariantDeclaration(Visit visit, TIntermInvariantDeclaration *node) override;
     bool visitDeclaration(Visit visit, TIntermDeclaration *node) override;
     bool visitLoop(Visit visit, TIntermLoop *) override;
     bool visitBranch(Visit visit, TIntermBranch *) override;
@@ -495,6 +496,14 @@
     return true;
 }
 
+bool TOutputTraverser::visitInvariantDeclaration(Visit visit, TIntermInvariantDeclaration *node)
+{
+    TInfoSinkBase &out = sink;
+    OutputTreeText(out, node, mDepth);
+    out << "Invariant Declaration:\n";
+    return true;
+}
+
 bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate *node)
 {
     TInfoSinkBase &out = sink;
@@ -677,10 +686,6 @@
             out << "outer product";
             break;
 
-        case EOpInvariantDeclaration:
-            out << "Invariant Declaration: ";
-            break;
-
         default:
             out.prefix(EPrefixError);
             out << "Bad aggregation op";