Skip to content

Commit 5373f52

Browse files
authored
Merge pull request #82546 from DougGregor/silgen-skip-isolated-deinit-6.2
[6.2] [SILGen] Ensure that we don't emit a skipped isolated deinit
2 parents 566a98d + 7fa6999 commit 5373f52

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
@@ -1633,7 +1633,7 @@ void SILGenModule::emitObjCAllocatorDestructor(ClassDecl *cd,
16331633
// Emit the isolated deallocating destructor.
16341634
// If emitted, it implements actual deallocating and deallocating destructor
16351635
// only switches executor
1636-
if (dd->hasBody() && isActorIsolated) {
1636+
if (dd->hasBody() && !dd->isBodySkipped() && isActorIsolated) {
16371637
SILDeclRef dealloc(dd, SILDeclRef::Kind::IsolatedDeallocator);
16381638
emitFunctionDefinition(dealloc, getFunction(dealloc, ForDefinition));
16391639
}

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)