diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-24 15:03:05 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-24 15:05:11 -0700 |
commit | 9290e0dd28e646c3dc810e0a6405582f8bf643b6 (patch) | |
tree | bee50f382fff16688c3df4c96150a0b0e0ce7270 | |
parent | ebefeb2bdd9b440f4b515986667e2bfb3147fe35 (diff) |
Make inlined function variables auto, not in/out.
-rw-r--r-- | ir_function_inlining.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ir_function_inlining.cpp b/ir_function_inlining.cpp index d74de650e0..851c0dd9f7 100644 --- a/ir_function_inlining.cpp +++ b/ir_function_inlining.cpp @@ -146,11 +146,12 @@ ir_call::generate_inline(ir_instruction *next_ir) /* Generate a new variable for the parameter. */ parameters[i] = (ir_variable *)sig_param->clone(ht); + parameters[i]->mode = ir_var_auto; next_ir->insert_before(parameters[i]); /* Move the actual param into our param variable if it's an 'in' type. */ - if (parameters[i]->mode == ir_var_in || - parameters[i]->mode == ir_var_inout) { + if (sig_param->mode == ir_var_in || + sig_param->mode == ir_var_inout) { ir_assignment *assign; assign = new ir_assignment(new ir_dereference_variable(parameters[i]), |