[clang-tools-extra] a9bf327 - [clangd] Fix build after D115243

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 13 04:44:29 PST 2022


Author: Kirill Bobyrev
Date: 2022-01-13T13:44:19+01:00
New Revision: a9bf32763d3929672fe243f84e6a103c91260ef0

URL: https://github.com/llvm/llvm-project/commit/a9bf32763d3929672fe243f84e6a103c91260ef0
DIFF: https://github.com/llvm/llvm-project/commit/a9bf32763d3929672fe243f84e6a103c91260ef0.diff

LOG: [clangd] Fix build after D115243

The api for loadIndex changed but was not updated everywhere due to
differences in the build configuration.

Added: 
    

Modified: 
    clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp
    clang-tools-extra/clangd/index/remote/server/Server.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp b/clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp
index 68bd8d02b0b47..77fca2a81569f 100644
--- a/clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp
+++ b/clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp
@@ -23,11 +23,13 @@ namespace clangd {
 namespace {
 
 std::unique_ptr<SymbolIndex> buildMem() {
-  return loadIndex(IndexFilename, /*UseDex=*/false);
+  return loadIndex(IndexFilename, clang::clangd::SymbolOrigin::Static,
+                   /*UseDex=*/false);
 }
 
 std::unique_ptr<SymbolIndex> buildDex() {
-  return loadIndex(IndexFilename, /*UseDex=*/true);
+  return loadIndex(IndexFilename, clang::clangd::SymbolOrigin::Static,
+                   /*UseDex=*/true);
 }
 
 // Reads JSON array of serialized FuzzyFindRequest's from user-provided file.

diff  --git a/clang-tools-extra/clangd/index/remote/server/Server.cpp b/clang-tools-extra/clangd/index/remote/server/Server.cpp
index b5acb5d030b9d..ee1d74fe9cb30 100644
--- a/clang-tools-extra/clangd/index/remote/server/Server.cpp
+++ b/clang-tools-extra/clangd/index/remote/server/Server.cpp
@@ -534,7 +534,8 @@ int main(int argc, char *argv[]) {
     return Status.getError().value();
   }
 
-  auto SymIndex = clang::clangd::loadIndex(IndexPath);
+  auto SymIndex =
+      clang::clangd::loadIndex(IndexPath, clang::clangd::SymbolOrigin::Static);
   if (!SymIndex) {
     llvm::errs() << "Failed to open the index.\n";
     return -1;


        


More information about the cfe-commits mailing list