Keep TIntermSymbol nodes consistent in PruneNoOps
Create new TVariables to change struct declaration qualifiers in
PruneNoOps so that the node doesn't end up with an inconsistent
qualifier from the variable.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I7f6cd557eb3e46f4ead4ffbe37d8960ff7776d10
Reviewed-on: https://chromium-review.googlesource.com/850673
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/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index a50b125..2d58a28 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -419,7 +419,7 @@
// for float, so float literal statements would end up with no precision which is
// invalid ESSL.
// After this empty declarations are not allowed in the AST.
- PruneNoOps(root);
+ PruneNoOps(root, &symbolTable);
// In case the last case inside a switch statement is a certain type of no-op, GLSL
// compilers in drivers may not accept it. In this case we clean up the dead code from the