Index: clangd/index/dex/dexp/Dexp.cpp =================================================================== --- clangd/index/dex/dexp/Dexp.cpp +++ clangd/index/dex/dexp/Dexp.cpp @@ -31,9 +31,9 @@ namespace { llvm::cl::opt - SymbolCollection("symbol-collection-file", - llvm::cl::desc("Path to the file with symbol collection"), - llvm::cl::Positional, llvm::cl::Required); + IndexPath("index-path", + llvm::cl::desc("Path to the index"), + llvm::cl::Positional, llvm::cl::Required); static const std::string Overview = R"( This is an **experimental** interactive tool to process user-provided search @@ -253,6 +253,10 @@ llvm::make_unique}, }; +std::unique_ptr openIndex(llvm::StringRef Index) { + return loadIndex(Index, /*URISchemes=*/{}, /*UseDex=*/true); +} + } // namespace int main(int argc, const char *argv[]) { @@ -262,13 +266,11 @@ std::unique_ptr Index; reportTime("Dex build", [&]() { - Index = loadIndex(SymbolCollection, /*URISchemes=*/{}, - /*UseDex=*/true); + Index = openIndex(IndexPath); }); if (!Index) { - llvm::outs() - << "ERROR: Please provide a valid path to symbol collection file.\n"; + llvm::outs() << "Failed to open the index.\n"; return -1; }