summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_validate.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-03-07 15:08:22 -0800
committerIan Romanick <[email protected]>2011-03-08 11:47:25 -0800
commit2df56b002dcc5d7e91515bd0ca741677f0172b38 (patch)
treee3da76a4254f5d6398e851ab13fd93b82aa20571 /src/glsl/ir_validate.cpp
parent719f07e45a4cd43d1edce196512b54f36ada53b1 (diff)
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.
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r--src/glsl/ir_validate.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 44d7549ea28..5e491db2c41 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -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;