glsl: Fix erroneous cast in ast_jump_statement::hir()
authorChad Versace <chad.versace@intel.com>
Wed, 17 Nov 2010 18:28:01 +0000 (10:28 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 17 Nov 2010 19:59:32 +0000 (11:59 -0800)
Return values were erroneously cast from (ir_rvalue*) to (ir_expression*).

NOTE: This is a candidate for the 7.9 branch.

src/glsl/ast_to_hir.cpp

index 4540e98e69b23454032bd3c69e2073dd5cafb980..d615b30e7daf23c0b75c8e1f811e8a3b2d89feec 100644 (file)
@@ -2636,8 +2636,7 @@ ast_jump_statement::hir(exec_list *instructions,
                             state->current_function->function_name());
         }
 
-        ir_expression *const ret = (ir_expression *)
-           opt_return_value->hir(instructions, state);
+        ir_rvalue *const ret = opt_return_value->hir(instructions, state);
         assert(ret != NULL);
 
         /* Implicit conversions are not allowed for return values. */