Remove TFunctionSymbolInfo from TIntermAggregate
All the information stored in TFunctionSymbolInfo was duplicated from
the TFunction that the aggregate node pointed to.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I1f5574ab0416e5cae00c3dae6fc11d2fe1fa128c
Reviewed-on: https://chromium-review.googlesource.com/827065
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/OutputGLSLBase.cpp b/src/compiler/translator/OutputGLSLBase.cpp
index 9d02919..4ffa5b2 100644
--- a/src/compiler/translator/OutputGLSLBase.cpp
+++ b/src/compiler/translator/OutputGLSLBase.cpp
@@ -938,11 +938,11 @@
{
if (node->getOp() == EOpCallBuiltInFunction)
{
- out << translateTextureFunction(node->getFunctionSymbolInfo()->getName());
+ out << translateTextureFunction(*node->getFunction()->name());
}
else
{
- out << hashFunctionNameIfNeeded(*node->getFunctionSymbolInfo());
+ out << hashFunctionNameIfNeeded(node->getFunction());
}
out << "(";
}
@@ -1143,6 +1143,18 @@
return hashName(name);
}
+TString TOutputGLSLBase::hashFunctionNameIfNeeded(const TFunction *func)
+{
+ if (func->isMain())
+ {
+ return *func->name();
+ }
+ else
+ {
+ return hashName(TName(func));
+ }
+}
+
TString TOutputGLSLBase::hashFunctionNameIfNeeded(const TFunctionSymbolInfo &info)
{
if (info.isMain())