Files
Erik Eckstein a3a716f1c5 SIL: require public metadata for destroys in serialized functions
`canDestroyFixedABIValue` checked whether type metadata is accessible from the current module only.
But serialized (e.g. `@inlinable`) functions are inlined into other modules.
Therefore the DeinitDevirtualizer still decomposed the destroy of a public non-copyable struct in the serialized body of an `@inlinable` function into a destroy of an internal field type with a deinit.
A client which inlined the function failed to link because of the field type's undefined metadata:

```
  // module Lib
  struct Inner: ~Copyable {
    deinit { ... }
  }
  public struct Manager: ~Copyable {
    var inner: Inner
  }
  @inlinable public func consumeInLib(_ m: consuming Manager) {}
```

In code with minimal resilience expansion, i.e. serialized code, require that the metadata has public or package linkage.
This does not affect Embedded Swift, where cross-module-optimization makes internal types used in serialized code `@usableFromInline`.

Fixes https://github.com/swiftlang/swift/issues/94452
2026-11-19 09:45:40 +01:00
..
2026-11-09 14:24:41 -08:00
2026-10-29 16:49:52 +00:00
2026-10-04 10:31:07 -07:00