TIntermDeclaration *TIntermTraverser::createTempInitDeclaration(TIntermTyped *initializer, TQualifier qualifier) { ASSERT(initializer != nullptr); TIntermSymbol *tempSymbol = createTempSymbol(initializer->getType(), qualifier); TIntermDeclaration *tempDeclaration = new TIntermDeclaration(); TIntermBinary *tempInit = new TIntermBinary(EOpInitialize, tempSymbol, initializer); tempDeclaration->appendDeclarator(tempInit); return tempDeclaration; }
TIntermDeclaration *TIntermTraverser::createTempDeclaration(const TType &type) { TIntermDeclaration *tempDeclaration = new TIntermDeclaration(); tempDeclaration->appendDeclarator(createTempSymbol(type)); return tempDeclaration; }