Set the type of a function call to be the return type of the callee
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 23 Mar 2010 19:21:18 +0000 (12:21 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 23 Mar 2010 19:21:18 +0000 (12:21 -0700)
ir.h

diff --git a/ir.h b/ir.h
index 618f2a6..997a37c 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -298,6 +298,8 @@ public:
    ir_call(const ir_function_signature *callee, exec_list *actual_parameters)
       : ir_instruction(ir_op_call), callee(callee)
    {
+      assert(callee->return_type != NULL);
+      type = callee->return_type;
       actual_parameters->move_nodes_to(& this->actual_parameters);
    }