ir_function_signature: Add method to get the function owning a signature

There is no setter function, the getter returns a constant pointer,
and ir_function_signature::_function is private for a reason.  The
only way to make a connection between a function and function
signature is via ir_function::add_signature.  This helps ensure that
certain invariants (i.e., a function signature is in the list of
signatures for its _function) are met.
This commit is contained in:
Ian Romanick
2010-07-02 13:28:32 -07:00
parent f3235eb37f
commit df05ad4e1a
2 changed files with 22 additions and 5 deletions

View File

@@ -771,7 +771,7 @@ ir_variable::component_slots() const
ir_function_signature::ir_function_signature(const glsl_type *return_type)
: return_type(return_type), is_defined(false)
: return_type(return_type), is_defined(false), _function(NULL)
{
/* empty */
}