From 882dad75408fc4071a9dd700309f9e54f6ad2650 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 23 Mar 2010 17:42:04 -0700 Subject: [PATCH] ir_function constructor now takes the function name as a parameter --- ast_to_hir.cpp | 4 +--- ir.cpp | 4 ++-- ir.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index ace80718d59..f7c82fab4bf 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -1095,9 +1095,7 @@ ast_function_definition::hir(exec_list *instructions, "non-function", name); signature = NULL; } else { - f = new ir_function(); - f->name = name; - + f = new ir_function(name); state->symbols->add_function(f->name, f); } diff --git a/ir.cpp b/ir.cpp index 4f7ea1bf1af..26e73943053 100644 --- a/ir.cpp +++ b/ir.cpp @@ -103,8 +103,8 @@ ir_function_signature::ir_function_signature(const glsl_type *return_type) } -ir_function::ir_function(void) - : ir_instruction(ir_op_func) +ir_function::ir_function(const char *name) + : ir_instruction(ir_op_func), name(name) { /* empty */ } diff --git a/ir.h b/ir.h index 997a37c0795..7db617d65b8 100644 --- a/ir.h +++ b/ir.h @@ -157,7 +157,7 @@ public: */ class ir_function : public ir_instruction { public: - ir_function(void); + ir_function(const char *name); virtual void accept(ir_visitor *v) { -- 2.30.2