Commits
Michael Gottesman committed 04aaf791f07
[verifier] Make sure all SILFunctions only have one out parameter and that out parameter is the first argument to the function.
This is already an assumption in SILFunctionType:
bool hasIndirectResult() const {
return !getParameters().empty()
&& getParameters()[0].isIndirectResult();
}
SILParameterInfo getIndirectResult() const {
assert(hasIndirectResult());
return getParameters()[0];
}
This just bakes the invariant into the IR so it is clear when writing tests that
this is not an issue.
I also updated function_ref and partial_apply to have the same such checks. This
should handle the majority of the cases.
Swift SVN r22119