diff options
Diffstat (limited to 'ir_expression_flattening.cpp')
-rw-r--r-- | ir_expression_flattening.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ir_expression_flattening.cpp b/ir_expression_flattening.cpp index 3089f17ae1..5ba24e390b 100644 --- a/ir_expression_flattening.cpp +++ b/ir_expression_flattening.cpp @@ -80,18 +80,19 @@ do_expression_flattening(exec_list *instructions, static ir_rvalue * operand_to_temp(ir_instruction *base_ir, ir_rvalue *ir) { + void *ctx = talloc_parent(base_ir); ir_variable *var; ir_assignment *assign; - var = new ir_variable(ir->type, "flattening_tmp"); + var = new(ctx) ir_variable(ir->type, "flattening_tmp"); base_ir->insert_before(var); - assign = new ir_assignment(new ir_dereference_variable(var), - ir, - NULL); + assign = new(ctx) ir_assignment(new(ctx) ir_dereference_variable(var), + ir, + NULL); base_ir->insert_before(assign); - return new ir_dereference_variable(var); + return new(ctx) ir_dereference_variable(var); } ir_visitor_status |