Files
swift-mirror/test/IRGen/alloc_box.swift
Arnold Schwaighofer e7dbf7cc4d runtime: Add and use swift_deallocUninitializedObject for uninitialized objects
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).
2017-11-03 09:44:07 -07:00

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