Skip to content

Commit f3ea8bd

Browse files
committed
[Serialization] Preparation for giving swiftdoc its own version
The functionality change in this commit is that the control block in a swiftdoc file is validated rather than just being ignored. Tests in following commit.
1 parent 81c24cd commit f3ea8bd

File tree

9 files changed

+201
-133
lines changed

9 files changed

+201
-133
lines changed

Diff for: include/swift/Serialization/DeclTypeRecordNodes.def

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#endif
7878

7979
// These IDs must \em not be renumbered or reordered without incrementing
80-
// VERSION_MAJOR in ModuleFormat.h. Names, however, may change.
80+
// the version in ModuleFormat.h. Names, however, may change.
8181
FIRST_TYPE(BUILTIN_ALIAS, 1)
8282
TYPE(GENERIC_TYPE_PARAM)
8383
TYPE(DEPENDENT_MEMBER)

Diff for: include/swift/Serialization/ModuleFile.h

+5
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,11 @@ class ModuleFile
548548
/// Returns false if there was an error.
549549
bool readCommentBlock(llvm::BitstreamCursor &cursor);
550550

551+
/// Loads data from #ModuleDocInputBuffer.
552+
///
553+
/// Returns false if there was an error.
554+
bool readModuleDocIfPresent();
555+
551556
/// Recursively reads a pattern from \c DeclTypeCursor.
552557
llvm::Expected<Pattern *> readPattern(DeclContext *owningDC);
553558

0 commit comments

Comments
 (0)