Refactor function call node creation
This makes function call node creation code simpler and more type
safe. It also prepares for further simplification by removing usage of
TFunction in places where the arguments node is sufficient.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I75d9e059bb32c475487f0be24e40ac0d78012d86
Reviewed-on: https://chromium-review.googlesource.com/433217
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/EmulatePrecision.cpp b/src/compiler/translator/EmulatePrecision.cpp
index 39811fe..6ae74a3 100644
--- a/src/compiler/translator/EmulatePrecision.cpp
+++ b/src/compiler/translator/EmulatePrecision.cpp
@@ -429,8 +429,7 @@
TIntermAggregate *createInternalFunctionCallNode(TString name, TIntermNode *child)
{
- TIntermAggregate *callNode = new TIntermAggregate();
- callNode->setOp(EOpFunctionCall);
+ TIntermAggregate *callNode = new TIntermAggregate(EOpFunctionCall);
TName nameObj(TFunction::mangleName(name));
nameObj.setInternal(true);
callNode->getFunctionSymbolInfo()->setNameObj(nameObj);