Skip to content

Commit 9e4fa8f

Browse files
committed
Updates to MoveOnlyChecker
1 parent 8c1231e commit 9e4fa8f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerUtils.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,14 @@ addressBeginsInitialized(MarkUnresolvedNonCopyableValueInst *address) {
11131113
return true;
11141114
}
11151115

1116+
if (auto *applyInst = dyn_cast_or_null<ApplyInst>(
1117+
stripAccessMarkers(operand)->getDefiningInstruction())) {
1118+
if (applyInst->getSubstCalleeConv().hasGuaranteedAddressResults()) {
1119+
LLVM_DEBUG(llvm::dbgs() << "Adding apply as init!\n");
1120+
return true;
1121+
}
1122+
}
1123+
11161124
if (isa<UncheckedTakeEnumDataAddrInst>(stripAccessMarkers(operand))) {
11171125
LLVM_DEBUG(llvm::dbgs()
11181126
<< "Adding enum projection as init!\n");

0 commit comments

Comments
 (0)