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 618f2a655afb8ec22d96ac4b11b31689c47b6e81..997a37c0795c3c884e694b8014bd74c25a31074d 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);
    }