From c7a18da69022d3f9b05c21ff2473e8ea390f77f1 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 19 Jul 2010 21:44:03 -0700 Subject: glsl2: Replace insert_before/remove pairs with exec_node::replace_with. --- src/glsl/ir_function_inlining.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/glsl/ir_function_inlining.cpp') diff --git a/src/glsl/ir_function_inlining.cpp b/src/glsl/ir_function_inlining.cpp index 05dd83f7ffd..c391f12d883 100644 --- a/src/glsl/ir_function_inlining.cpp +++ b/src/glsl/ir_function_inlining.cpp @@ -91,8 +91,7 @@ replace_return_with_assignment(ir_instruction *ir, void *data) if (ret) { if (ret->value) { ir_rvalue *lhs = new(ctx) ir_dereference_variable(retval); - ret->insert_before(new(ctx) ir_assignment(lhs, ret->value, NULL)); - ret->remove(); + ret->replace_with(new(ctx) ir_assignment(lhs, ret->value, NULL)); } else { /* un-valued return has to be the last return, or we shouldn't * have reached here. (see can_inline()). -- cgit v1.2.3