Skip to content

Commit cab17c7

Browse files
committed
[NFC] AddressLowering: Reuse old operand index.
Rather than hard-coding an operand number, ask the operand for it.
1 parent 32ee81e commit cab17c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SILOptimizer/Mandatory/AddressLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2994,12 +2994,12 @@ class UseRewriter : SILInstructionVisitor<UseRewriter> {
29942994
switch (bi->getBuiltinKind().value_or(BuiltinValueKind::None)) {
29952995
case BuiltinValueKind::ResumeNonThrowingContinuationReturning: {
29962996
SILValue opAddr = addrMat.materializeAddress(use->get());
2997-
bi->setOperand(1, opAddr);
2997+
bi->setOperand(use->getOperandNumber(), opAddr);
29982998
break;
29992999
}
30003000
case BuiltinValueKind::ResumeThrowingContinuationReturning: {
30013001
SILValue opAddr = addrMat.materializeAddress(use->get());
3002-
bi->setOperand(1, opAddr);
3002+
bi->setOperand(use->getOperandNumber(), opAddr);
30033003
break;
30043004
}
30053005
case BuiltinValueKind::Copy: {

0 commit comments

Comments
 (0)