mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Add grouping information of Stdlib to its module documentation file and deserialize it into ModuleFile.
We currently do not support more sophisticated naming mechanisms; group names are stemmed source file names.
This commit is contained in:
@@ -296,6 +296,9 @@ private:
|
||||
using SerializedDeclCommentTable =
|
||||
llvm::OnDiskIterableChainedHashTable<DeclCommentTableInfo>;
|
||||
|
||||
using GroupNameTable = llvm::DenseMap<unsigned, StringRef>;
|
||||
|
||||
std::unique_ptr<GroupNameTable> GroupNamesMap;
|
||||
std::unique_ptr<SerializedDeclCommentTable> DeclCommentTable;
|
||||
|
||||
struct {
|
||||
@@ -398,6 +401,9 @@ private:
|
||||
std::unique_ptr<SerializedDeclCommentTable>
|
||||
readDeclCommentTable(ArrayRef<uint64_t> fields, StringRef blobData);
|
||||
|
||||
std::unique_ptr<GroupNameTable>
|
||||
readGroupTable(ArrayRef<uint64_t> fields, StringRef blobData);
|
||||
|
||||
/// Reads the comment block, which contains USR to comment mappings.
|
||||
///
|
||||
/// Returns false if there was an error.
|
||||
@@ -608,6 +614,8 @@ public:
|
||||
virtual void finishNormalConformance(NormalProtocolConformance *conformance,
|
||||
uint64_t contextData) override;
|
||||
|
||||
Optional<StringRef> getGroupNameById(unsigned Id);
|
||||
Optional<StringRef> getGroupNameForDecl(const Decl *D);
|
||||
Optional<BriefAndRawComment> getCommentForDecl(const Decl *D);
|
||||
Optional<BriefAndRawComment> getCommentForDeclByUSR(StringRef USR);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user