Duplicate reused symbol table entries.

BUG=angle:651

Change-Id: Ifce3c19d41a0a5a5ca5ee90ede528adf397d1da5
Reviewed-on: https://chromium-review.googlesource.com/204290
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
diff --git a/src/compiler/translator/SymbolTable.h b/src/compiler/translator/SymbolTable.h
index 078e0be..d3ddf19 100644
--- a/src/compiler/translator/SymbolTable.h
+++ b/src/compiler/translator/SymbolTable.h
@@ -185,7 +185,7 @@
           defined(false)
     {
     }
-    TFunction(const TString *name, TType &retType, TOperator tOp = EOpNull)
+    TFunction(const TString *name, const TType &retType, TOperator tOp = EOpNull)
         : TSymbol(name),
           returnType(retType),
           mangledName(TFunction::mangleName(*name)),
@@ -288,8 +288,7 @@
     }
     ~TSymbolTableLevel();
 
-    bool insert(const TString &name, TSymbol &symbol);
-    bool insert(TSymbol &symbol);
+    bool insert(TSymbol *symbol);
 
     TSymbol *find(const TString &name) const;
 
@@ -351,12 +350,12 @@
         precisionStack.pop_back();
     }
 
-    bool declare(TSymbol &symbol)
+    bool declare(TSymbol *symbol)
     {
         return insert(currentLevel(), symbol);
     }
 
-    bool insert(ESymbolLevel level, TSymbol &symbol)
+    bool insert(ESymbolLevel level, TSymbol *symbol)
     {
         return table[level]->insert(symbol);
     }
@@ -366,7 +365,7 @@
         TVariable *constant = new TVariable(
             NewPoolTString(name), TType(EbtInt, EbpUndefined, EvqConst, 1));
         constant->getConstPointer()->setIConst(value);
-        return insert(level, *constant);
+        return insert(level, constant);
     }
 
     void insertBuiltIn(ESymbolLevel level, TType *rvalue, const char *name,