Skip to content

Commit

Permalink
SIL: add getCalleeFunction utility also in ApplySite
Browse files Browse the repository at this point in the history
  • Loading branch information
eeckstein committed Nov 16, 2015
1 parent 3e894f3 commit ea5c51a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/swift/SIL/SILInstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -4238,6 +4238,11 @@ class ApplySite {
FOREACH_IMPL_RETURN(getCallee());
}

// Return the referenced function if the callee is a function_ref instruction.
SILFunction *getCalleeFunction() const {
FOREACH_IMPL_RETURN(getCalleeFunction());
}

/// Return the type.
SILType getType() const {
FOREACH_IMPL_RETURN(getSubstCalleeType()->getResult().getSILType());
Expand Down

0 comments on commit ea5c51a

Please sign in to comment.