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 4257842583958398fdccc2396f024112daab8125..f3ee12ce81f32c3004004c61edadf8dcb9a43c6c 100644 (file)
@@ -836,6 +836,14 @@ ir_call::get_error_instruction(void *ctx)
    return call;
 }
 
+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)
 {
index 0d5bbc20aa82d67d5e5029d5e38db9d278a753b7..89922c6bbcd79fbd3ee338e06f3254f92a552896 100644 (file)
@@ -694,6 +694,11 @@ public:
       return callee;
    }
 
+   /**
+    * 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.