mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Completion] Remove unused DocWords
The various keyword/recommended/etc fields were parsed and added to completions, but never actually plumbed through SourceKit. Since they're still unused and the implementation is not particularly lightweight, just remove for now. Resolves rdar://82464220
This commit is contained in:
@@ -102,7 +102,7 @@ CodeCompletionCache::~CodeCompletionCache() {}
|
||||
///
|
||||
/// This should be incremented any time we commit a change to the format of the
|
||||
/// cached results. This isn't expected to change very often.
|
||||
static constexpr uint32_t onDiskCompletionCacheVersion = 1;
|
||||
static constexpr uint32_t onDiskCompletionCacheVersion = 2;
|
||||
|
||||
/// Deserializes CodeCompletionResults from \p in and stores them in \p V.
|
||||
/// \see writeCacheModule.
|
||||
@@ -219,14 +219,6 @@ static bool readCachedModule(llvm::MemoryBuffer *in,
|
||||
assocUSRs.push_back(getString(read32le(cursor)));
|
||||
}
|
||||
|
||||
auto declKeywordCount = read32le(cursor);
|
||||
SmallVector<std::pair<StringRef, StringRef>, 4> declKeywords;
|
||||
for (unsigned i = 0; i < declKeywordCount; ++i) {
|
||||
auto first = getString(read32le(cursor));
|
||||
auto second = getString(read32le(cursor));
|
||||
declKeywords.push_back(std::make_pair(first, second));
|
||||
}
|
||||
|
||||
CodeCompletionString *string = getCompletionString(chunkIndex);
|
||||
auto moduleName = getString(moduleIndex);
|
||||
auto sourceFilePath = getString(sourceFilePathIndex);
|
||||
@@ -240,7 +232,6 @@ static bool readCachedModule(llvm::MemoryBuffer *in,
|
||||
declKind, isSystem, moduleName, sourceFilePath, notRecommended,
|
||||
diagSeverity, diagMessage, briefDocComment,
|
||||
copyArray(*V.Sink.Allocator, ArrayRef<StringRef>(assocUSRs)),
|
||||
copyArray(*V.Sink.Allocator, ArrayRef<std::pair<StringRef, StringRef>>(declKeywords)),
|
||||
CodeCompletionResult::Unknown, opKind);
|
||||
} else {
|
||||
result = new (*V.Sink.Allocator)
|
||||
@@ -386,13 +377,6 @@ static void writeCachedModule(llvm::raw_ostream &out,
|
||||
for (unsigned i = 0; i < R->getAssociatedUSRs().size(); ++i) {
|
||||
LE.write(addString(R->getAssociatedUSRs()[i]));
|
||||
}
|
||||
|
||||
auto AllKeywords = R->getDeclKeywords();
|
||||
LE.write(static_cast<uint32_t>(AllKeywords.size()));
|
||||
for (unsigned i = 0; i < AllKeywords.size(); ++i) {
|
||||
LE.write(addString(AllKeywords[i].first));
|
||||
LE.write(addString(AllKeywords[i].second));
|
||||
}
|
||||
}
|
||||
}
|
||||
LE.write(static_cast<uint32_t>(results.tell()));
|
||||
|
||||
Reference in New Issue
Block a user