mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -3941,17 +3941,20 @@ public:
|
||||
S.DeclTypeAbbrCodes[ConditionalSubstitutionLayout::Code];
|
||||
for (const auto *subs :
|
||||
opaqueDecl->getConditionallyAvailableSubstitutions().drop_back()) {
|
||||
SmallVector<IdentifierID, 4> conditions;
|
||||
|
||||
for (const auto &condition : subs->getAvailability()) {
|
||||
auto lowerEndpoint = condition.getLowerEndpoint();
|
||||
conditions.push_back(
|
||||
S.addUniquedStringRef(lowerEndpoint.getAsString()));
|
||||
}
|
||||
|
||||
ConditionalSubstitutionLayout::emitRecord(
|
||||
S.Out, S.ScratchRecord, abbrCode,
|
||||
S.addSubstitutionMapRef(subs->getSubstitutions()), conditions);
|
||||
S.addSubstitutionMapRef(subs->getSubstitutions()));
|
||||
|
||||
unsigned condAbbrCode =
|
||||
S.DeclTypeAbbrCodes[ConditionalSubstitutionConditionLayout::Code];
|
||||
for (const auto &condition : subs->getAvailability()) {
|
||||
ENCODE_VER_TUPLE(osVersion, llvm::Optional<llvm::VersionTuple>(
|
||||
condition.first.getLowerEndpoint()));
|
||||
ConditionalSubstitutionConditionLayout::emitRecord(
|
||||
S.Out, S.ScratchRecord, condAbbrCode,
|
||||
/*isUnavailable=*/condition.second,
|
||||
LIST_VER_TUPLE_PIECES(osVersion));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5130,6 +5133,7 @@ void Serializer::writeAllDeclsAndTypes() {
|
||||
registerDeclTypeAbbr<XRefLayout>();
|
||||
|
||||
registerDeclTypeAbbr<ConditionalSubstitutionLayout>();
|
||||
registerDeclTypeAbbr<ConditionalSubstitutionConditionLayout>();
|
||||
|
||||
#define DECL_ATTR(X, NAME, ...) \
|
||||
registerDeclTypeAbbr<NAME##DeclAttrLayout>();
|
||||
|
||||
Reference in New Issue
Block a user