mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This is a follow-up of 1dfb3b1a2a.
We need to be more conservative about types as for functions, because types can also "produce" symbols, like direct field offsets, etc.
rdar://96953318
19 lines
266 B
Swift
19 lines
266 B
Swift
|
|
public func incrementByOne(_ x: Int) -> Int {
|
|
return x + 1
|
|
}
|
|
|
|
@_semantics("optimize.no.crossmodule")
|
|
public func incrementByOneNoCMO(_ x: Int) -> Int {
|
|
return x + 1
|
|
}
|
|
|
|
public final class SubmoduleKlass {
|
|
public var i: Int
|
|
|
|
public init() {
|
|
i = 27
|
|
}
|
|
}
|
|
|