[Serialization] Preserve whether a raw value is explicit (#26324)

...which allows the AST printer to correctly choose whether to print
it, which means it can be printed in a module interface in a non-WMO
build, which is necessary for @objc enums to have a correct run-time
representation when clients use that interface.

rdar://problem/53469608
This commit is contained in:
Jordan Rose
2019-07-24 10:25:42 -07:00
committed by GitHub
parent 71c4c16b38
commit 28b3d8e0a7
5 changed files with 30 additions and 11 deletions

View File

@@ -52,7 +52,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
/// 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.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t SWIFTMODULE_VERSION_MINOR = 503; // remove 'requires stored property inits'
const uint16_t SWIFTMODULE_VERSION_MINOR = 504; // distinguish implicit raw values for enum cases
using DeclIDField = BCFixed<31>;
@@ -1194,6 +1194,7 @@ namespace decls_block {
BCFixed<1>, // implicit?
BCFixed<1>, // has payload?
EnumElementRawValueKindField, // raw value kind
BCFixed<1>, // implicit raw value?
BCFixed<1>, // negative raw value?
IdentifierIDField, // raw value
BCVBR<5>, // number of parameter name components