Merge pull request #2458 from ShchchowAMD/unique_id-fix

Fix issue for new unique id system.
This commit is contained in:
greg-lunarg 2021-02-15 13:22:14 -07:00 committed by GitHub
commit b0f8a0c3ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 110 additions and 71 deletions

View file

@ -4296,8 +4296,10 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
// If it wasn't at a built-in level, then it's already been redeclared;
// that is, this is a redeclaration of a redeclaration; reuse that initial
// redeclaration. Otherwise, make the new one.
if (builtIn)
if (builtIn) {
makeEditable(symbol);
symbolTable.amendSymbolIdLevel(*symbol);
}
// Now, modify the type of the copy, as per the type of the current redeclaration.
@ -4826,7 +4828,7 @@ void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init,
}
// get the unique id of the loop index
int loopIndex = binaryInit->getLeft()->getAsSymbolNode()->getId();
long long loopIndex = binaryInit->getLeft()->getAsSymbolNode()->getId();
inductiveLoopIds.insert(loopIndex);
// condition's form must be "loop-index relational-operator constant-expression"