Refactor debug output of types

Instead of passing around strings from TType::getCompleteString(),
add a stream operator to InfoSinkBase that takes a TType. This makes
the compiler executable a few kilobytes smaller and will help with
getting rid of TString altogether.

BUG=angleproject:2267
TEST=angle_unittests

Change-Id: I31a6693b40a28824b3959e19ad3c0a2ce0f0a35f
Reviewed-on: https://chromium-review.googlesource.com/1107712
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/OutputTree.cpp b/src/compiler/translator/OutputTree.cpp
index adcd242..316bdfc 100644
--- a/src/compiler/translator/OutputTree.cpp
+++ b/src/compiler/translator/OutputTree.cpp
@@ -96,7 +96,7 @@
         mOut << "'" << node->getName() << "' ";
     }
     mOut << "(symbol id " << node->uniqueId().get() << ") ";
-    mOut << "(" << node->getCompleteString() << ")";
+    mOut << "(" << node->getType() << ")";
     mOut << "\n";
 }
 
@@ -107,7 +107,7 @@
     node->writeOffsetsAsXYZW(&mOut);
     mOut << ")";
 
-    mOut << " (" << node->getCompleteString() << ")";
+    mOut << " (" << node->getType() << ")";
     mOut << "\n";
     return true;
 }
@@ -262,7 +262,7 @@
             mOut << "<unknown op>";
     }
 
-    mOut << " (" << node->getCompleteString() << ")";
+    mOut << " (" << node->getType() << ")";
 
     mOut << "\n";
 
@@ -345,7 +345,7 @@
             break;
     }
 
-    mOut << " (" << node->getCompleteString() << ")";
+    mOut << " (" << node->getType() << ")";
 
     mOut << "\n";
 
@@ -370,15 +370,14 @@
 {
     OutputTreeText(mOut, node, getCurrentIndentDepth());
     OutputFunction(mOut, "Function Prototype", node->getFunction());
-    mOut << " (" << node->getCompleteString() << ")";
+    mOut << " (" << node->getType() << ")";
     mOut << "\n";
     size_t paramCount = node->getFunction()->getParamCount();
     for (size_t i = 0; i < paramCount; ++i)
     {
         const TVariable *param = node->getFunction()->getParam(i);
         OutputTreeText(mOut, node, getCurrentIndentDepth() + 1);
-        mOut << "parameter: " << param->name() << " (" << param->getType().getCompleteString()
-             << ")";
+        mOut << "parameter: " << param->name() << " (" << param->getType() << ")";
     }
 }
 
@@ -447,7 +446,7 @@
             break;
     }
 
-    mOut << " (" << node->getCompleteString() << ")";
+    mOut << " (" << node->getType() << ")";
 
     mOut << "\n";
 
@@ -475,7 +474,7 @@
     OutputTreeText(mOut, node, getCurrentIndentDepth());
 
     mOut << "Ternary selection";
-    mOut << " (" << node->getCompleteString() << ")\n";
+    mOut << " (" << node->getType() << ")\n";
 
     ++mIndentDepth;