glsl: Function signatures cannot have NULL return type

The return type can be void, and this is the case where a `_ret_val'
variable should not be declared.
This commit is contained in:
Ian Romanick
2011-03-07 15:08:22 -08:00
parent 719f07e45a
commit 2df56b002d
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
parameters = new ir_variable *[num_parameters];
/* Generate storage for the return value. */
if (this->callee->return_type) {
if (!this->callee->return_type->is_void()) {
retval = new(ctx) ir_variable(this->callee->return_type, "_ret_val",
ir_var_auto);
next_ir->insert_before(retval);