Clean up AddDefaultReturnStatements
It doesn't need to use a traverser, since all function definitions can
be found simply by iterating over the children of the root node.
BUG=angleproject:2040
TEST=angle_end2end_tests
Change-Id: I380942f90a0e73152f296b98d1fb027762d913b0
Reviewed-on: https://chromium-review.googlesource.com/508689
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/Compiler.h b/src/compiler/translator/Compiler.h
index c39766e..2614199 100644
--- a/src/compiler/translator/Compiler.h
+++ b/src/compiler/translator/Compiler.h
@@ -139,7 +139,7 @@
virtual void initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu,
ShCompileOptions compileOptions){};
// Translate to object code.
- virtual void translate(TIntermNode *root, ShCompileOptions compileOptions) = 0;
+ virtual void translate(TIntermBlock *root, ShCompileOptions compileOptions) = 0;
// Returns true if, after applying the packing rules in the GLSL 1.017 spec
// Appendix A, section 7, the shader does not use too many uniforms.
bool enforcePackingRestrictions();