mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -104,7 +104,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 =
|
||||
11; // Added macro roles
|
||||
12; // Removed 'IsAsync'.
|
||||
|
||||
/// Deserializes CodeCompletionResults from \p in and stores them in \p V.
|
||||
/// \see writeCacheModule.
|
||||
@@ -236,7 +236,6 @@ static bool readCachedModule(llvm::MemoryBuffer *in,
|
||||
auto diagSeverity =
|
||||
static_cast<CodeCompletionDiagnosticSeverity>(*cursor++);
|
||||
auto isSystem = static_cast<bool>(*cursor++);
|
||||
auto isAsync = static_cast<bool>(*cursor++);
|
||||
auto hasAsyncAlternative = static_cast<bool>(*cursor++);
|
||||
auto chunkIndex = read32le(cursor);
|
||||
auto moduleIndex = read32le(cursor);
|
||||
@@ -267,8 +266,8 @@ static bool readCachedModule(llvm::MemoryBuffer *in,
|
||||
|
||||
ContextFreeCodeCompletionResult *result =
|
||||
new (*V.Allocator) ContextFreeCodeCompletionResult(
|
||||
kind, associatedKind, opKind, roles, isSystem, isAsync,
|
||||
hasAsyncAlternative, string, moduleName, briefDocComment,
|
||||
kind, associatedKind, opKind, roles, isSystem,
|
||||
hasAsyncAlternative, string, moduleName, briefDocComment,
|
||||
llvm::ArrayRef(assocUSRs).copy(*V.Allocator),
|
||||
CodeCompletionResultType(resultTypes), notRecommended, diagSeverity,
|
||||
diagMessage, filterName, nameForDiagnostics);
|
||||
@@ -427,7 +426,6 @@ static void writeCachedModule(llvm::raw_ostream &out,
|
||||
LE.write(static_cast<uint8_t>(R->getNotRecommendedReason()));
|
||||
LE.write(static_cast<uint8_t>(R->getDiagnosticSeverity()));
|
||||
LE.write(static_cast<uint8_t>(R->isSystem()));
|
||||
LE.write(static_cast<uint8_t>(R->isAsync()));
|
||||
LE.write(static_cast<uint8_t>(R->hasAsyncAlternative()));
|
||||
LE.write(
|
||||
static_cast<uint32_t>(addCompletionString(R->getCompletionString())));
|
||||
|
||||
Reference in New Issue
Block a user