mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix several incorrect uses of ApplySite::getArgumentConvention.
At least most of these were latent bugs since the code was unreachable in the PartialApply case. But that's no excuse to misuse the API. Also, whenever referring to an integer index, be explicit about whether it is an applied argument or callee argument.
This commit is contained in:
@@ -2713,7 +2713,7 @@ public:
|
||||
auto isConsumingOrMutatingApplyUse = [](Operand *use) -> bool {
|
||||
ApplySite apply(use->getUser());
|
||||
assert(apply && "Not an apply instruction kind");
|
||||
auto conv = apply.getArgumentConvention(use->getOperandNumber() - 1);
|
||||
auto conv = apply.getArgumentConvention(*use);
|
||||
switch (conv) {
|
||||
case SILArgumentConvention::Indirect_In_Guaranteed:
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user