Skip to content

Commit 95e4d32

Browse files
committed
[SILGen] Ensure that we don't emit a skipped isolated deinit
Fixes rdar://154373088 / issue #82523
1 parent 5391887 commit 95e4d32

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/SILGen/SILGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@ void SILGenModule::emitObjCAllocatorDestructor(ClassDecl *cd,
16381638
// Emit the isolated deallocating destructor.
16391639
// If emitted, it implements actual deallocating and deallocating destructor
16401640
// only switches executor
1641-
if (dd->hasBody() && isActorIsolated) {
1641+
if (dd->hasBody() && !dd->isBodySkipped() && isActorIsolated) {
16421642
SILDeclRef dealloc(dd, SILDeclRef::Kind::IsolatedDeallocator);
16431643
emitFunctionDefinition(dealloc, getFunction(dealloc, ForDefinition));
16441644
}

test/Concurrency/deinit_isolation_objc.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-implicit-string-processing-module-import -target %target-future-triple -parse-as-library -emit-silgen -DSILGEN %s | %FileCheck %s
33
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-implicit-string-processing-module-import -target %target-future-triple -parse-as-library -emit-silgen -DSILGEN %s | %FileCheck -check-prefix=CHECK-SYMB %s
44

5+
6+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-implicit-string-processing-module-import -target %target-future-triple -parse-as-library -emit-module -DSILGEN -experimental-skip-non-inlinable-function-bodies-without-types %s
7+
58
// REQUIRES: concurrency
69
// REQUIRES: objc_interop
710

0 commit comments

Comments
 (0)