Skip to content

Commit c0c7bf3

Browse files
authored
Merge pull request swiftlang#82545 from DougGregor/silgen-skip-isolated-deinit
[SILGen] Ensure that we don't emit a skipped isolated deinit
2 parents 39e011e + 95e4d32 commit c0c7bf3

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
@@ -1663,7 +1663,7 @@ void SILGenModule::emitObjCAllocatorDestructor(ClassDecl *cd,
16631663
// Emit the isolated deallocating destructor.
16641664
// If emitted, it implements actual deallocating and deallocating destructor
16651665
// only switches executor
1666-
if (dd->hasBody() && isActorIsolated) {
1666+
if (dd->hasBody() && !dd->isBodySkipped() && isActorIsolated) {
16671667
SILDeclRef dealloc(dd, SILDeclRef::Kind::IsolatedDeallocator);
16681668
emitFunctionDefinition(dealloc, getFunction(dealloc, ForDefinition));
16691669
}

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)