Files
swift-mirror/lib/SILOptimizer/IPO/CrossModuleOptimization.cpp
elsh cb0720b77e Package CMO: Prevent serializing types from SDK/system modules imported as @_implementationOnly.
Currently, types from @_implementationOnly modules can be serialized into client modules if their
defining modules are SDK or system modules.

However, @_implementationOnly is intended to hide types from external clients, and may cause
the type’s metadata (e.g., field offsets) to be stripped. If such types are serialized and later
accessed by a client module, it can lead to linker errors due to the missing metadata.

This PR prevents all types imported with @_implementationOnly from being serialized.

Resolves rdar://144181455
2025-02-05 11:00:37 -08:00

42 KiB