Skip to content

Commit 72dd727

Browse files
authored
Merge pull request #67894 from atrick/revert-onstack-check
Revert "Verify that on-stack closures do not take owned arguments"
2 parents 8e53e7a + 8de3694 commit 72dd727

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

include/swift/SIL/ApplySite.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,6 @@ class ApplySite {
390390
case SILArgumentConvention::Pack_Inout:
391391
return conv;
392392
case SILArgumentConvention::Direct_Owned:
393-
assert(!pai->isOnStack() &&
394-
"on-stack closures do not support owned arguments");
395-
return conv;
396393
case SILArgumentConvention::Direct_Unowned:
397394
case SILArgumentConvention::Direct_Guaranteed:
398395
return pai->isOnStack() ? SILArgumentConvention::Direct_Guaranteed

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,11 +1956,6 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
19561956
unsigned appliedArgStartIdx =
19571957
substConv.getNumSILArguments() - PAI->getNumArguments();
19581958
for (auto p : llvm::enumerate(PAI->getArguments())) {
1959-
if (PAI->isOnStack()) {
1960-
require(
1961-
substConv.getSILArgumentConvention(appliedArgStartIdx + p.index()),
1962-
"on-stack closures do not support owned arguments");
1963-
}
19641959
requireSameType(
19651960
p.value()->getType(),
19661961
substConv.getSILArgumentType(appliedArgStartIdx + p.index(),

0 commit comments

Comments
 (0)