Skip to content

Commit

Permalink
[clangd] Bump index version number.
Browse files Browse the repository at this point in the history
https://reviews.llvm.org/D89670 changed the Ref structure, we need to
bump the version to invalidate all stored stale data, otherwise we will
get ` Error while reading shard: malformed or truncated refs` when
building the background index.

Differential Revision: https://reviews.llvm.org/D91131
  • Loading branch information
hokein committed Nov 10, 2020
1 parent 085f900 commit 71064b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang-tools-extra/clangd/index/Serialization.cpp
Expand Up @@ -418,7 +418,7 @@ readCompileCommand(Reader CmdReader, llvm::ArrayRef<llvm::StringRef> Strings) {
// The current versioning scheme is simple - non-current versions are rejected.
// If you make a breaking change, bump this version number to invalidate stored
// data. Later we may want to support some backward compatibility.
constexpr static uint32_t Version = 13;
constexpr static uint32_t Version = 14;

llvm::Expected<IndexFileIn> readRIFF(llvm::StringRef Data) {
auto RIFF = riff::readFile(Data);
Expand Down

0 comments on commit 71064b0

Please sign in to comment.