Skip to content

Commit 09d7e35

Browse files
committed
Fix assertion failure
1 parent 65567b5 commit 09d7e35

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/SILOptimizer/Transforms/TempRValueElimination.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ collectLoads(Operand *addressUse, CopyAddrInst *originalCopy,
200200
case SILInstructionKind::ApplyInst:
201201
case SILInstructionKind::TryApplyInst:
202202
case SILInstructionKind::BeginApplyInst: {
203-
auto convention = ApplySite(user).getArgumentParameterInfo(*addressUse);
204-
if (!convention.isGuaranteed())
203+
auto site = ApplySite(user);
204+
if (site.getArgumentConvention(*addressUse).isIndirectOutParameter() ||
205+
!site.getArgumentParameterInfo(*addressUse).isGuaranteed())
205206
return false;
206207

207208
loadInsts.insert(user);

0 commit comments

Comments
 (0)