mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When merging partial SIL modules we only link in function bodies defined in the current module, so we might encounter functions with shared linkage and no body. Since pulling in these functions from other modules is a waste of time, run the verifier in "single function" mode in this case. Note that when the module is ultimately used and one of these functions is deserialized, we should link in all downstream functions with shared linkage, and failure to do so will be caught by the SIL verifier then. Fixes <rdar://problem/34469704>.
10 lines
410 B
Swift
10 lines
410 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend -emit-module -primary-file %s -module-name test -o %t/partial.swiftmodule -O
|
|
|
|
// RUN: %target-swift-frontend -emit-module %t/partial.swiftmodule -module-name test -sil-merge-partial-modules -disable-diagnostic-passes -disable-sil-perf-optzns -o %t/test.swiftmodule
|
|
|
|
public func makeMirror(object x: Any) -> Mirror {
|
|
return Mirror(reflecting: x)
|
|
}
|