n->Var = var;
if (!n->Store) {
- /* need to setup storage */
- if (n->Var && n->Var->store) {
- /* node storage info = var storage info */
- n->Store = n->Var->store;
+ /* need to setup node's storage */
+ if (var->store) {
+ /* node's storage = var's storage */
+ n->Store = var->store;
}
else {
/* alloc new storage info */
(char*) var->a_name,
(void*) n->Store, n->Store->Size);
#endif
- if (n->Var)
- n->Var->store = n->Store;
- assert(n->Var->store);
+ var->store = n->Store;
}
}
}
{
slang_ir_node *n = new_node0(IR_VAR);
if (n) {
+ ASSERT(var->store);
_slang_attach_storage(n, var);
}
return n;