From 876d68985310b0339fd14c47a531374b1c158108 Mon Sep 17 00:00:00 2001 From: Brent Royal-Gordon Date: Tue, 11 Aug 2020 16:43:52 -0700 Subject: [PATCH] [NFC] Rework serialization changes in #32811 This tweaks the implementation of SE-0285 to preserve backwards compatibility with the previous module serialization format. Existing default arguments all keep their previous values when serialized; #fileID and Swift 6 #file are given previously unused values. Fixes rdar://66810027. --- lib/Serialization/ModuleFormat.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Serialization/ModuleFormat.h b/lib/Serialization/ModuleFormat.h index a82630319116f..e2527a9309847 100644 --- a/lib/Serialization/ModuleFormat.h +++ b/lib/Serialization/ModuleFormat.h @@ -55,7 +55,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 = 557; // #fileID +const uint16_t SWIFTMODULE_VERSION_MINOR = 556; // Serialization of -implicit-dynamic /// A standard hash seed used for all string hashes in a serialized module. /// @@ -459,10 +459,8 @@ using ValueOwnershipField = BCFixed<2>; enum class DefaultArgumentKind : uint8_t { None = 0, Normal, - FileID, - FilePath, - FileIDSpelledAsFile, FilePathSpelledAsFile, + FilePath, Line, Column, Function, @@ -472,6 +470,8 @@ enum class DefaultArgumentKind : uint8_t { EmptyArray, EmptyDictionary, StoredProperty, + FileIDSpelledAsFile, + FileID }; using DefaultArgumentField = BCFixed<4>;