Skip to content

Commit 1b8c088

Browse files
committed
Fixup serialization code with changes from IndexSubset.
1 parent 3b8498d commit 1b8c088

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Serialization/Serialization.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "swift/AST/FileSystem.h"
2121
#include "swift/AST/ForeignErrorConvention.h"
2222
#include "swift/AST/GenericEnvironment.h"
23+
#include "swift/AST/IndexSubset.h"
2324
#include "swift/AST/Initializer.h"
2425
#include "swift/AST/LazyResolver.h"
2526
#include "swift/AST/LinkLibrary.h"
@@ -2291,8 +2292,8 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
22912292
auto paramIndices = attr->getParameterIndices();
22922293
assert(paramIndices && "Checked parameter indices must be resolved");
22932294
SmallVector<bool, 4> indices;
2294-
for (unsigned i : swift::indices(paramIndices->parameters))
2295-
indices.push_back(paramIndices->parameters[i]);
2295+
for (unsigned i : range(paramIndices->getCapacity()))
2296+
indices.push_back(paramIndices->contains(i));
22962297

22972298
DifferentiableDeclAttrLayout::emitRecord(
22982299
S.Out, S.ScratchRecord, abbrCode, attr->isImplicit(),

0 commit comments

Comments
 (0)