Skip to content

Commit 7986024

Browse files
committed
[Serialization] Clarify role of matchAttributes in FileUnit
The subclasses to FileUnit uses the functionref matchAttributes differently, clarify how only SerializedASTFile uses the functionref to limit deserialization work.
1 parent d01126b commit 7986024

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/swift/AST/FileUnit.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,10 @@ class FileUnit : public DeclContext {
159159
///
160160
/// \param Results Vector collecting the decls.
161161
///
162-
/// \param matchAttributes Check on the attributes of a decl to
163-
/// filter which decls to fully deserialize. Only decls with accepted
164-
/// attributes are deserialized and added to Results.
162+
/// \param matchAttributes Check on the attributes of a decl to keep only
163+
/// decls with matching attributes. The subclass SerializedASTFile checks the
164+
/// attributes first to only deserialize decls with accepted attributes,
165+
/// limiting deserialization work.
165166
virtual void
166167
getTopLevelDeclsWhereAttributesMatch(
167168
SmallVectorImpl<Decl*> &Results,

0 commit comments

Comments
 (0)