Insert GLSL ES 1.0 built-in variables at the right level.
TRAC #22954
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2271 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseHelper.cpp
index 441ff35..5deda55 100644
--- a/src/compiler/ParseHelper.cpp
+++ b/src/compiler/ParseHelper.cpp
@@ -751,7 +751,7 @@
if (type.arraySize)
variable->getType().setArraySize(type.arraySize);
- if (! symbolTable.insert(*variable)) {
+ if (! symbolTable.declare(*variable)) {
delete variable;
error(line, "INTERNAL ERROR inserting new symbol", identifier.c_str());
return true;
@@ -885,7 +885,7 @@
variable = new TVariable(&identifier, TType(type));
- if (! symbolTable.insert(*variable)) {
+ if (! symbolTable.declare(*variable)) {
error(line, "redefinition", variable->getName().c_str());
delete variable;
variable = 0;
@@ -1012,7 +1012,7 @@
// add variable to symbol table
//
variable = new TVariable(&identifier, type);
- if (! symbolTable.insert(*variable)) {
+ if (! symbolTable.declare(*variable)) {
error(line, "redefinition", variable->getName().c_str());
return true;
// don't delete variable, it's used by error recovery, and the pool