mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This ended up in creating a lot of Array functions, even if a program didn't use Array at all. Now, only add specialization attributes if a function is already there. Otherwise remember the attributes and add them to a function once it is created.
14 lines
252 B
Swift
14 lines
252 B
Swift
// RUN: %target-swift-frontend -primary-file %s -O -emit-sil | %FileCheck %s
|
|
|
|
// Check that no Array code is de-serialized due to specialization attributes
|
|
|
|
// CHECK-NOT: Array
|
|
|
|
@inline(never)
|
|
func foo<T>(_ x: T) {
|
|
}
|
|
|
|
public func test() {
|
|
foo(27)
|
|
}
|