From 4bbf6d1d2b20bccd784a326f33bdb860032db361 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Thu, 28 Nov 2013 14:46:38 -0800 Subject: [PATCH] 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 --- src/glsl/loop_analysis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp index 56191447166..302e931234f 100644 --- a/src/glsl/loop_analysis.cpp +++ b/src/glsl/loop_analysis.cpp @@ -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); -- 2.30.2