mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
Default function parameters to 'in' instead of auto
This commit is contained in:
parent
7e3ed40200
commit
cdb8d54b68
1 changed files with 6 additions and 1 deletions
|
|
@ -1007,7 +1007,12 @@ ast_parameter_declarator::hir(exec_list *instructions,
|
||||||
* FINISHME: complete handling of constant expressions.
|
* FINISHME: complete handling of constant expressions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Apply any specified qualifiers to the parameter declaration. Note that
|
||||||
|
* for function parameters the default mode is 'in'.
|
||||||
|
*/
|
||||||
apply_type_qualifier_to_variable(& this->type->qualifier, var, state);
|
apply_type_qualifier_to_variable(& this->type->qualifier, var, state);
|
||||||
|
if (var->mode == ir_var_auto)
|
||||||
|
var->mode = ir_var_in;
|
||||||
|
|
||||||
instructions->push_tail(var);
|
instructions->push_tail(var);
|
||||||
|
|
||||||
|
|
@ -1155,7 +1160,7 @@ ast_function_definition::hir(exec_list *instructions,
|
||||||
foreach_iter(exec_list_iterator, iter, parameters) {
|
foreach_iter(exec_list_iterator, iter, parameters) {
|
||||||
ir_variable *const var = (ir_variable *) iter.get();
|
ir_variable *const var = (ir_variable *) iter.get();
|
||||||
|
|
||||||
assert(var->mode == ir_op_var_decl);
|
assert(((ir_instruction *)var)->mode == ir_op_var_decl);
|
||||||
|
|
||||||
iter.remove();
|
iter.remove();
|
||||||
instructions->push_tail(var);
|
instructions->push_tail(var);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue