Memory: Put pragma tables in the pool.

Fixes #916 (the last change covered by the PR).
3rd list item in #976.
This commit is contained in:
John Kessenich 2017-11-20 17:41:39 -07:00
parent cbdf871d7f
commit fd1d07daf1
5 changed files with 12 additions and 9 deletions

View file

@ -3170,10 +3170,10 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
node->getLoc());
}
void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable)
void TIntermAggregate::setPragmaTable(const TPragmaTable& pTable)
{
assert(!pragmaTable);
pragmaTable = new TPragmaTable();
assert(pragmaTable == nullptr);
pragmaTable = new TPragmaTable;
*pragmaTable = pTable;
}