Files
swift-mirror/test/SILGen/closure_inline_initializer.swift
Slava Pestov 94ce4c2ac3 SIL: Only give closures shared linkage if they're going to be serialized
Otherwise, we don't want them to be linkonce_odr at the LLVM level
to avoid unnecessary link-time overhead.
2017-03-31 20:26:27 -07:00

11 lines
224 B
Swift

// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s
// CHECK-LABEL: sil private @_T026closure_inline_initializer3FooV3fooSivfiSiycfU_
struct Foo {
var foo: Int = { 2 }()
init(x: Int) {}
init(y: Int) {}
}