glsl/loops: Allocate loop_terminator using new(mem_ctx) syntax.

Patches to follow will introduce code into the loop_terminator
constructor.  Allocating loop_terminator using new(mem_ctx) syntax
will ensure that the constructor runs.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Paul Berry
2013-11-28 14:46:38 -08:00
parent 714e1b331e
commit 4bbf6d1d2b

View File

@@ -134,7 +134,7 @@ loop_terminator *
loop_variable_state::insert(ir_if *if_stmt)
{
void *mem_ctx = ralloc_parent(this);
loop_terminator *t = rzalloc(mem_ctx, loop_terminator);
loop_terminator *t = new(mem_ctx) loop_terminator();
t->ir = if_stmt;
this->terminators.push_tail(t);