Files
swift-mirror/test/SILOptimizer/implicit_imports.swift
Erik Eckstein 15c6abf66d SIL: avoid creating SIL functions for not used imported specialization attributes
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.
2024-11-05 20:37:15 +01:00

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)
}