typedef enum {
PARAMETER_LIST_NO_MATCH,
PARAMETER_LIST_EXACT_MATCH,
- PARAMETER_LIST_INEXACT_MATCH, /*< Match requires implicit conversion. */
+ PARAMETER_LIST_INEXACT_MATCH /*< Match requires implicit conversion. */
} parameter_list_match_t;
/**
const ir_variable *const param = (ir_variable *) node_a;
- const ir_instruction *const actual = (ir_instruction *) node_b;
+ const ir_rvalue *const actual = (ir_rvalue *) node_b;
if (param->type == actual->type)
continue;
ir_function_signature *
ir_function::matching_signature(const exec_list *actual_parameters)
+{
+ bool is_exact;
+ return matching_signature(actual_parameters, &is_exact);
+}
+
+ir_function_signature *
+ir_function::matching_signature(const exec_list *actual_parameters,
+ bool *is_exact)
{
ir_function_signature *match = NULL;
bool multiple_inexact_matches = false;
switch (parameter_lists_match(& sig->parameters, actual_parameters)) {
case PARAMETER_LIST_EXACT_MATCH:
+ *is_exact = true;
return sig;
case PARAMETER_LIST_INEXACT_MATCH:
if (match == NULL)
* FINISHME: a "no matching signature" error; it should report that the
* FINISHME: call is ambiguous. But reporting errors from here is hard.
*/
+ *is_exact = false;
+
if (multiple_inexact_matches)
return NULL;