File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -5213,6 +5213,16 @@ class DeclDeserializer {
5213
5213
elem->setAccess (std::max (cast<EnumDecl>(DC)->getFormalAccess (),
5214
5214
AccessLevel::Internal));
5215
5215
5216
+ SmallVector<LifetimeDependenceInfo, 1 > lifetimeDependencies;
5217
+ while (auto info = MF.maybeReadLifetimeDependence ()) {
5218
+ assert (info.has_value ());
5219
+ lifetimeDependencies.push_back (*info);
5220
+ }
5221
+
5222
+ ctx.evaluator .cacheOutput (LifetimeDependenceInfoRequest{elem},
5223
+ lifetimeDependencies.empty ()? std::nullopt :
5224
+ ctx.AllocateCopy (lifetimeDependencies));
5225
+
5216
5226
return elem;
5217
5227
}
5218
5228
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
58
58
// / describe what change you made. The content of this comment isn't important;
59
59
// / it just ensures a conflict if two people change the module format.
60
60
// / Don't worry about adhering to the 80-column limit for this line.
61
- const uint16_t SWIFTMODULE_VERSION_MINOR = 942 ; // update LifetimeDependenceLayout
61
+ const uint16_t SWIFTMODULE_VERSION_MINOR = 943 ; // Lifetime dependencies on enum element
62
62
63
63
// / A standard hash seed used for all string hashes in a serialized module.
64
64
// /
Original file line number Diff line number Diff line change @@ -5014,6 +5014,14 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
5014
5014
nameComponentsAndDependencies);
5015
5015
if (auto *PL = elem->getParameterList ())
5016
5016
writeParameterList (PL);
5017
+
5018
+ auto fnType = ty->getAs <AnyFunctionType>();
5019
+ if (fnType) {
5020
+ auto lifetimeDependencies = fnType->getLifetimeDependencies ();
5021
+ if (!lifetimeDependencies.empty ()) {
5022
+ S.writeLifetimeDependencies (lifetimeDependencies);
5023
+ }
5024
+ }
5017
5025
}
5018
5026
5019
5027
void visitSubscriptDecl (const SubscriptDecl *subscript) {
You can’t perform that action at this time.
0 commit comments