mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This patch adds support for serialization and deserialization of debug scopes. Debug scopes are serialized in post order and enablement is controlled through the experimental-serialize-debug-info flag which is turned off by default. Functions only referred to by these debug scopes are deserialized as zombie functions directly.
28 lines
463 B
Swift
28 lines
463 B
Swift
@inlinable @inline(__always)
|
|
public func foo(x: UInt64) -> UInt64 {
|
|
if (x > 100) {
|
|
return 100
|
|
}
|
|
return 1
|
|
}
|
|
|
|
@_transparent
|
|
public func specializedGenericInlined() -> Int {
|
|
return id(1)
|
|
}
|
|
|
|
@_transparent
|
|
@inline(__always)
|
|
public func id<T: Equatable>(_ x: T) -> T{
|
|
return x
|
|
}
|
|
|
|
@_alwaysEmitIntoClient
|
|
public func barGeneric<T: Numeric>(_ x: [T], sum: T) -> T {
|
|
var temp = sum
|
|
for i in x {
|
|
temp += i
|
|
}
|
|
return temp
|
|
}
|