From: Kenneth Graunke Date: Thu, 12 Aug 2010 20:17:53 +0000 (-0700) Subject: ir_reader: Don't mark functions as defined if their body is empty. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d802ba110f78c3eee9541867cde819ada1b2c449;p=mesa.git ir_reader: Don't mark functions as defined if their body is empty. --- diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index 14bd2d62fd7..2def3efff56 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -297,7 +297,7 @@ read_function_sig(_mesa_glsl_parse_state *st, ir_function *f, s_list *list, sig->replace_parameters(&hir_parameters); - if (!skip_body) { + if (!skip_body && !body_list->subexpressions.is_empty()) { if (sig->is_defined) { ir_read_error(st, list, "function %s redefined", f->name); return;