mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Handle XREFs to private types (#14352)
We can encounter these when the compiler modifies an inlinable function to break apart a struct and the struct uses a private type for one of its fields. It's questionable whether we /should/ handle this, but meanwhile this /is/ a non-intrusive fix that preserves the performance of non-resilient libraries. (That is, it appears this worked in Swift 4.0, though perhaps not all of the same optimizations kicked in.) https://bugs.swift.org/browse/SR-6874
This commit is contained in:
@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
const uint16_t VERSION_MINOR = 397; // No resilience expansion in SILDeclRef
|
||||
const uint16_t VERSION_MINOR = 398; // Private discriminators for type xrefs
|
||||
|
||||
using DeclIDField = BCFixed<31>;
|
||||
|
||||
@@ -1288,6 +1288,7 @@ namespace decls_block {
|
||||
using XRefTypePathPieceLayout = BCRecordLayout<
|
||||
XREF_TYPE_PATH_PIECE,
|
||||
IdentifierIDField, // name
|
||||
IdentifierIDField, // private discriminator
|
||||
BCFixed<1> // restrict to protocol extension
|
||||
>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user