Files
swift-mirror/test/Frontend/sil-merge-partial-modules-stdlib.swift
Slava Pestov 6478256b20 SIL: Relax some verifier checks when merging partial modules
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>.
2017-09-18 23:59:23 -07:00

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