TranslatorGLSL: collect variables when flattening pramga invariant all

BUG=chromium:659472

Change-Id: Icfeada9f09fff5d28eb3f4fafb2c94d57598af1f
Reviewed-on: https://chromium-review.googlesource.com/403849
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index c3812f9..6c8a9d6 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -879,6 +879,16 @@
     }
 }
 
+bool TCompiler::shouldCollectVariables(ShCompileOptions compileOptions)
+{
+    return (compileOptions & SH_VARIABLES) != 0;
+}
+
+bool TCompiler::wereVariablesCollected() const
+{
+    return variablesCollected;
+}
+
 bool TCompiler::enforcePackingRestrictions()
 {
     VariablePacker packer;