mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SILGen] Ensure that we don't emit a skipped isolated deinit
Fixes rdar://154373088 / issue #82523
This commit is contained in:
@@ -1663,7 +1663,7 @@ void SILGenModule::emitObjCAllocatorDestructor(ClassDecl *cd,
|
||||
// Emit the isolated deallocating destructor.
|
||||
// If emitted, it implements actual deallocating and deallocating destructor
|
||||
// only switches executor
|
||||
if (dd->hasBody() && isActorIsolated) {
|
||||
if (dd->hasBody() && !dd->isBodySkipped() && isActorIsolated) {
|
||||
SILDeclRef dealloc(dd, SILDeclRef::Kind::IsolatedDeallocator);
|
||||
emitFunctionDefinition(dealloc, getFunction(dealloc, ForDefinition));
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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
|
||||
// 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
|
||||
|
||||
|
||||
// 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
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user