Add ir_function::iterator to iterate over function signatures

This commit is contained in:
Ian Romanick 2010-03-31 16:40:26 -07:00
parent 6a15d5b514
commit 95cd6cc195
2 changed files with 9 additions and 1 deletions

View File

@ -1475,7 +1475,7 @@ ast_function_definition::hir(exec_list *instructions,
const char *const name = this->prototype->identifier;
f = state->symbols->get_function(name);
if (f != NULL) {
foreach_iter(exec_list_iterator, iter, f->signatures) {
foreach_iter(exec_list_iterator, iter, *f) {
signature = (struct ir_function_signature *) iter.get();
/* Compare the parameter list of the function being defined to the

8
ir.h
View File

@ -187,6 +187,14 @@ public:
signatures.push_tail(sig);
}
/**
* Get an iterator for the set of function signatures
*/
exec_list_iterator iterator()
{
return signatures.iterator();
}
/**
* Find a signature that matches a set of actual parameters.
*/