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 @@ -5259,6 +5259,16 @@ class DeclDeserializer {
5259
5259
elem->setAccess (std::max (cast<EnumDecl>(DC)->getFormalAccess (),
5260
5260
AccessLevel::Internal));
5261
5261
5262
+ SmallVector<LifetimeDependenceInfo, 1 > lifetimeDependencies;
5263
+ while (auto info = MF.maybeReadLifetimeDependence ()) {
5264
+ assert (info.has_value ());
5265
+ lifetimeDependencies.push_back (*info);
5266
+ }
5267
+
5268
+ ctx.evaluator .cacheOutput (LifetimeDependenceInfoRequest{elem},
5269
+ lifetimeDependencies.empty ()? std::nullopt :
5270
+ ctx.AllocateCopy (lifetimeDependencies));
5271
+
5262
5272
return elem;
5263
5273
}
5264
5274
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 = 954 ; // Checked cast inst options
61
+ const uint16_t SWIFTMODULE_VERSION_MINOR = 955 ; // 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 @@ -5021,6 +5021,14 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
5021
5021
nameComponentsAndDependencies);
5022
5022
if (auto *PL = elem->getParameterList ())
5023
5023
writeParameterList (PL);
5024
+
5025
+ auto fnType = ty->getAs <AnyFunctionType>();
5026
+ if (fnType) {
5027
+ auto lifetimeDependencies = fnType->getLifetimeDependencies ();
5028
+ if (!lifetimeDependencies.empty ()) {
5029
+ S.writeLifetimeDependencies (lifetimeDependencies);
5030
+ }
5031
+ }
5024
5032
}
5025
5033
5026
5034
void visitSubscriptDecl (const SubscriptDecl *subscript) {
You can’t perform that action at this time.
0 commit comments