swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.37k stars 10.34k forks source link

[PackageCMO] Make optimized binary module work for package-external client. #76729

Open elsh opened 2 days ago

elsh commented 2 days ago

A binary module with PackageCMO includes instructions that are typically disallowed in resilient mode. If the client module belongs to the same package, these instructions can be deserialized and inlined during optimization. However, this must be prevented for clients outside the package, as such instructions are invalid beyond the package domain and could trigger an assertion failure.

Resolves rdar://135345358

elsh commented 2 days ago

@swift-ci smoke test

aschwaighofer commented 2 days ago

Also needs test cases for (and code to handle deserialization of) sil_vtable and sil_witness_table

elsh commented 1 day ago

@swift-ci smoke test