Пример #1
0
TIntermDeclaration* ir_grow_declaration(TIntermDeclaration* declaration, TSymbol* symbol, TIntermTyped* initializer, TInfoSink& infoSink)
{
	TVariable* var = static_cast<TVariable*>(symbol);
	TIntermSymbol* sym = ir_add_symbol(var->getUniqueId(), var->getName(), var->getType(), var->getType().getLine());
	sym->setGlobal(symbol->isGlobal());
	
	return ir_grow_declaration(declaration, sym, initializer, infoSink);
}
Пример #2
0
// Add a terminal node for an identifier in an expression.
TIntermSymbol* ir_add_symbol(const TVariable* var, TSourceLoc line)
{
	TIntermSymbol* node = ir_add_symbol_internal(var->getUniqueId(), var->getName(), var->getInfo(), var->getType(), line);
	node->setGlobal(var->isGlobal());
	return node;
}