Store unmangled function names in the AST
This makes the code simpler across the board. There are a few cases
where mangled names still need to be generated in AST traversers, but
they are outweighed by much leaner output code for all function nodes.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: Id3638e0fca6019bbbe6fc5e1b7763870591da2d8
Reviewed-on: https://chromium-review.googlesource.com/461077
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/OutputGLSLBase.h b/src/compiler/translator/OutputGLSLBase.h
index 4c26c73..af3019c 100644
--- a/src/compiler/translator/OutputGLSLBase.h
+++ b/src/compiler/translator/OutputGLSLBase.h
@@ -70,10 +70,10 @@
// Same as hashName(), but without hashing built-in variables.
TString hashVariableName(const TName &name);
- // Same as hashName(), but without hashing built-in functions and with unmangling.
- TString hashFunctionNameIfNeeded(const TName &mangledName);
+ // Same as hashName(), but without hashing internal functions or "main".
+ TString hashFunctionNameIfNeeded(const TFunctionSymbolInfo &info);
// Used to translate function names for differences between ESSL and GLSL
- virtual TString translateTextureFunction(TString &name) { return name; }
+ virtual TString translateTextureFunction(const TString &name) { return name; }
private:
bool structDeclared(const TStructure *structure) const;