Skip to content

Commit 8de3694

Browse files
committed
Revert "Verify that on-stack closures do not take owned arguments"
This reverts commit 20f99b2. The assert triggers in in the i386 build in the function: // specialized Substring.UnicodeScalarView.replaceSubrange<A>(_:with:)
1 parent 07cbed6 commit 8de3694

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)