Files
swift-mirror/test/IRGen/alloc_box.swift
T
Arnold Schwaighofer d981bb1d96 Mangling: noescape functions will be trivial and no longer compatible with escape function types.
Mangle escapeness as part of the type.

Part of:
SR-5441
rdar://36116691
2018-02-06 08:51:43 -08:00

16 lines
356 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: @"$S9alloc_boxyyXEfU_"
// CHECK: <label>:8:
// CHECK-NOT: call void @swift_setDeallocating
// CHECK: call void @swift_deallocUninitializedObject