Replace remaining usage of TName with TSymbol
TName used to contain just a subset of the information stored in
TSymbol. It makes more sense to use TSymbol directly instead of
converting it to TName.
This also improves type safety a bit by making some functions only
take in TVariable or TFunction instead of the more generic TName.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Icb46923c25d33ebbbbc06ddc487da25957dda771
Reviewed-on: https://chromium-review.googlesource.com/829143
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ValidateLimitations.cpp b/src/compiler/translator/ValidateLimitations.cpp
index e43ff37..23f9989 100644
--- a/src/compiler/translator/ValidateLimitations.cpp
+++ b/src/compiler/translator/ValidateLimitations.cpp
@@ -119,7 +119,7 @@
{
error(node->getLine(),
"Loop index cannot be statically assigned to within the body of the loop",
- node->getSymbol().c_str());
+ node->getName().c_str());
}
}
@@ -248,7 +248,7 @@
if (!isConstExpr(declInit->getRight()))
{
error(declInit->getLine(), "Loop index cannot be initialized with non-constant expression",
- symbol->getSymbol().c_str());
+ symbol->getName().c_str());
return -1;
}
@@ -282,7 +282,7 @@
}
if (symbol->uniqueId().get() != indexSymbolId)
{
- error(symbol->getLine(), "Expected loop index", symbol->getSymbol().c_str());
+ error(symbol->getLine(), "Expected loop index", symbol->getName().c_str());
return false;
}
// Relational operator is one of: > >= < <= == or !=.
@@ -304,7 +304,7 @@
if (!isConstExpr(binOp->getRight()))
{
error(binOp->getLine(), "Loop index cannot be compared with non-constant expression",
- symbol->getSymbol().c_str());
+ symbol->getName().c_str());
return false;
}
@@ -353,7 +353,7 @@
}
if (symbol->uniqueId().get() != indexSymbolId)
{
- error(symbol->getLine(), "Expected loop index", symbol->getSymbol().c_str());
+ error(symbol->getLine(), "Expected loop index", symbol->getName().c_str());
return false;
}
@@ -381,7 +381,7 @@
if (!isConstExpr(binOp->getRight()))
{
error(binOp->getLine(), "Loop index cannot be modified by non-constant expression",
- symbol->getSymbol().c_str());
+ symbol->getName().c_str());
return false;
}
}