diff options
Diffstat (limited to 'glsl_parser_extras.cpp')
-rw-r--r-- | glsl_parser_extras.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/glsl_parser_extras.cpp b/glsl_parser_extras.cpp index 84a3fd9071..538d77c663 100644 --- a/glsl_parser_extras.cpp +++ b/glsl_parser_extras.cpp @@ -651,10 +651,8 @@ main(int argc, char **argv) /* Optimization passes */ if (!state.error) { /* Constant folding */ - foreach_iter(exec_list_iterator, iter, instructions) { - ir_constant_folding_visitor v; - ((ir_instruction *)iter.get())->accept(& v); - } + ir_constant_folding_visitor constant_folding; + visit_exec_list(&instructions, &constant_folding); } /* Print out the resulting IR */ |