swift
7c9ad6a6 - DeinitDevirtualizer: don't decompose destroys into destroys of fields which are not ABI accessible

Commit
13 days ago
DeinitDevirtualizer: don't decompose destroys into destroys of fields which are not ABI accessible If a non-copyable struct from another module has no deinit, the destroy is decomposed into destroys of its fields. But if a field has an internal type which is not fixed-size in the client module, its type metadata is not accessible. This resulted in a SIL verifier crash and in linker errors due to undefined type metadata accessors, e.g. ``` // module Lib struct Inner: ~Copyable { var r: SomeResilientType } public struct Manager: ~Copyable { var inner: Inner } ``` Destroying a `Manager` in a client module resulted in a `destroy_addr` of `Inner`. rdar://188400107
Author
Committer
Parents
Loading