glsl: compile unused function out
authorEric Engestrom <eric.engestrom@imgtec.com>
Tue, 12 Sep 2017 14:58:28 +0000 (15:58 +0100)
committerEric Engestrom <eric.engestrom@imgtec.com>
Wed, 13 Sep 2017 10:22:27 +0000 (11:22 +0100)
The function is only called from one place, which is hidden behind
the same `#ifdef DEBUG`.

Fixes: ca73c3358c91434e68ab "glsl: Mark functions static"
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/glsl/ir_validate.cpp

index becce771be230645a0480b3f76a33de8a7ab8057..50d611500c564b3e4f019b4daebbadecfc56a957 100644 (file)
@@ -1043,6 +1043,7 @@ ir_validate::validate_ir(ir_instruction *ir, void *data)
    _mesa_set_add(ir_set, ir);
 }
 
+#ifdef DEBUG
 static void
 check_node_type(ir_instruction *ir, void *data)
 {
@@ -1056,6 +1057,7 @@ check_node_type(ir_instruction *ir, void *data)
    if (value != NULL)
       assert(value->type != glsl_type::error_type);
 }
+#endif
 
 void
 validate_ir_tree(exec_list *instructions)