From f75c2d53146ea14f8dfedcc5b7a4704278ba0792 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 20 Sep 2011 17:58:45 -0700 Subject: glsl: Demote 'type' from ir_instruction to ir_rvalue and ir_variable. Variables have types, expression trees have types, but statements don't. Rather than have a nonsensical field that stays NULL in the base class, just move it to where it makes sense. Fix up a few places that lazily used ir_instruction even though they actually knew the particular subclass. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt Reviewed-by: Ian Romanick --- src/glsl/ast_function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/glsl/ast_function.cpp') diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index dfdbc55c57..39401017b8 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -83,7 +83,7 @@ prototype_string(const glsl_type *return_type, const char *name, const char *comma = ""; foreach_list(node, parameters) { - const ir_instruction *const param = (ir_instruction *) node; + const ir_variable *const param = (ir_variable *) node; ralloc_asprintf_append(&str, "%s%s", comma, param->type->name); comma = ", "; -- cgit v1.2.3