OSDN Git Service

ir_call: Add method to set the function signature being called
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 7 Jul 2010 18:33:13 +0000 (11:33 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 12 Jul 2010 22:19:29 +0000 (15:19 -0700)
src/glsl/ir.cpp
src/glsl/ir.h

index 4257842..f3ee12c 100644 (file)
@@ -837,6 +837,14 @@ ir_call::get_error_instruction(void *ctx)
 }
 
 void
+ir_call::set_callee(const ir_function_signature *sig)
+{
+   assert((this->type == NULL) || (this->type == sig->return_type));
+
+   this->callee = sig;
+}
+
+void
 visit_exec_list(exec_list *list, ir_visitor *visitor)
 {
    foreach_iter(exec_list_iterator, iter, *list) {
index 0d5bbc2..89922c6 100644 (file)
@@ -695,6 +695,11 @@ public:
    }
 
    /**
+    * Set the function call target
+    */
+   void set_callee(const ir_function_signature *sig);
+
+   /**
     * Generates an inline version of the function before @ir,
     * returning the return value of the function.
     */