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

View File

@@ -198,6 +198,12 @@ ir_validate::visit_enter(ir_function_signature *ir)
abort();
}
if (ir->return_type == NULL) {
printf("Function signature %p for function %s has NULL return type.\n",
ir, ir->function_name());
abort();
}
this->validate_ir(ir, this->data);
return visit_continue;