mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This is different from swift_deallocObject in that it applies to objects at +1 while swift_deallocObject actually only applies to objects whose state is deiniting (swift_release was called).
16 lines
363 B
Swift
16 lines
363 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir -o - | %FileCheck %s
|
|
|
|
func f() -> Bool? { return nil }
|
|
|
|
({
|
|
guard var b = f() else { return }
|
|
let c = { b = true }
|
|
_ = (b, c)
|
|
})()
|
|
|
|
// CHECK-LABEL: @_T09alloc_boxyycfU_
|
|
// CHECK: <label>:8:
|
|
// CHECK-NOT: call void @swift_setDeallocating
|
|
// CHECK: call void @swift_rt_swift_deallocUninitializedObject
|
|
|