swift
f2c0aab2 - Serialization: Error when decoding invalid PlatformKind values.

Commit
1 year ago
Serialization: Error when decoding invalid PlatformKind values. Recently, unexpected binary module sharing between compilers that had inconsistent views of the `PlatformKind` enumeration caused me to spend several days debugging undefined behavior in the compiler. We should validate that enumeration values decoded during deserialization are valid, and fail fast when they are not to make debugging this kind of issue less time consuming. This change just validates the `PlatformKind` value decoded for an `AvailableAttr`, but more of deserialization could be updated to do similar validation. Resolves rdar://123770273
Author
Committer
Parents
Loading