mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Otherwise, we don't want them to be linkonce_odr at the LLVM level to avoid unnecessary link-time overhead.
15 lines
318 B
Swift
15 lines
318 B
Swift
// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s
|
|
|
|
struct Foo<T> {}
|
|
struct Bar {}
|
|
|
|
extension Foo where T == Bar {
|
|
func foo(x: T) -> Bar {
|
|
// CHECK-LABEL: sil private @{{.*}}3foo{{.*}}4foo2{{.*}} : $@convention(thin) (Bar) -> Bar
|
|
func foo2() -> Bar {
|
|
return x
|
|
}
|
|
return foo2()
|
|
}
|
|
}
|