From 3cb4358f386d20c23de87b23a830f6c4ed0f08ad Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 28 Mar 2010 00:36:06 -0700 Subject: [PATCH] Add the instruction for the parameter variable declarations of builtin funcs. Matches constructor setup, but I'm not really sure why we make the variable twice. --- builtin_function.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin_function.cpp b/builtin_function.cpp index edb33dd8f35..58e3abfceb7 100644 --- a/builtin_function.cpp +++ b/builtin_function.cpp @@ -193,11 +193,13 @@ generate_function_instance(ir_function *f, for (i = 0; i < n_args; i++) { ir_variable *var = new ir_variable(type, arg_names[i]); + var = new ir_variable(type, arg_names[i]); var->mode = ir_var_in; sig->parameters.push_tail(var); var = new ir_variable(type, arg_names[i]); - + var->mode = ir_var_in; + instructions->push_tail(var); declarations[i] = var; } -- 2.30.2