diff options
Diffstat (limited to 'clang-tools-extra/clangd/index/BackgroundRebuild.cpp')
-rw-r--r-- | clang-tools-extra/clangd/index/BackgroundRebuild.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/index/BackgroundRebuild.cpp b/clang-tools-extra/clangd/index/BackgroundRebuild.cpp index cb6ac0fc8bf..4233e5c92a0 100644 --- a/clang-tools-extra/clangd/index/BackgroundRebuild.cpp +++ b/clang-tools-extra/clangd/index/BackgroundRebuild.cpp @@ -78,13 +78,13 @@ void BackgroundIndexRebuilder::idle() { void BackgroundIndexRebuilder::startLoading() { std::lock_guard<std::mutex> Lock(Mu); if (!Loading) - LoadedShards = 0; + LoadedTUs = 0; ++Loading; } -void BackgroundIndexRebuilder::loadedShard(size_t ShardCount) { +void BackgroundIndexRebuilder::loadedTU() { std::lock_guard<std::mutex> Lock(Mu); assert(Loading); - LoadedShards += ShardCount; + ++LoadedTUs; } void BackgroundIndexRebuilder::doneLoading() { maybeRebuild("after loading index from disk", [this] { @@ -93,7 +93,7 @@ void BackgroundIndexRebuilder::doneLoading() { if (Loading) // was loading multiple batches concurrently return false; // rebuild once the last batch is done. // Rebuild if we loaded any shards, or if we stopped an indexedTU rebuild. - return LoadedShards > 0 || enoughTUsToRebuild(); + return LoadedTUs > 0 || enoughTUsToRebuild(); }); } |