ir_call: Add method to set the function signature being called

This commit is contained in:
Ian Romanick
2010-07-07 11:33:13 -07:00
parent b500981226
commit 792e01c1e2
2 changed files with 13 additions and 0 deletions

View 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)
{

View 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.