hokein updated this revision to Diff 168639. hokein added a comment. address comment.
Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52976 Files: clangd/tool/ClangdMain.cpp Index: clangd/tool/ClangdMain.cpp =================================================================== --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -158,11 +158,11 @@ "an include line will be inserted or not."), llvm::cl::init(true)); -static llvm::cl::opt<Path> YamlSymbolFile( - "yaml-symbol-file", +static llvm::cl::opt<Path> IndexFile( + "index-file", llvm::cl::desc( - "YAML-format global symbol file to build the static index. Clangd will " - "use the static index for global code completion.\n" + "Index file to build the static index. The file must have been created " + "by a compatible clangd-index.\n" "WARNING: This option is experimental only, and will be removed " "eventually. Don't rely on it."), llvm::cl::init(""), llvm::cl::Hidden); @@ -288,12 +288,12 @@ Opts.BuildDynamicSymbolIndex = EnableIndex; std::unique_ptr<SymbolIndex> StaticIdx; std::future<void> AsyncIndexLoad; // Block exit while loading the index. - if (EnableIndex && !YamlSymbolFile.empty()) { + if (EnableIndex && !IndexFile.empty()) { // Load the index asynchronously. Meanwhile SwapIndex returns no results. SwapIndex *Placeholder; StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique<MemIndex>())); AsyncIndexLoad = runAsync<void>([Placeholder, &Opts] { - if (auto Idx = loadIndex(YamlSymbolFile, Opts.URISchemes, UseDex)) + if (auto Idx = loadIndex(IndexFile, Opts.URISchemes, UseDex)) Placeholder->reset(std::move(Idx)); }); if (RunSynchronously)
Index: clangd/tool/ClangdMain.cpp =================================================================== --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -158,11 +158,11 @@ "an include line will be inserted or not."), llvm::cl::init(true)); -static llvm::cl::opt<Path> YamlSymbolFile( - "yaml-symbol-file", +static llvm::cl::opt<Path> IndexFile( + "index-file", llvm::cl::desc( - "YAML-format global symbol file to build the static index. Clangd will " - "use the static index for global code completion.\n" + "Index file to build the static index. The file must have been created " + "by a compatible clangd-index.\n" "WARNING: This option is experimental only, and will be removed " "eventually. Don't rely on it."), llvm::cl::init(""), llvm::cl::Hidden); @@ -288,12 +288,12 @@ Opts.BuildDynamicSymbolIndex = EnableIndex; std::unique_ptr<SymbolIndex> StaticIdx; std::future<void> AsyncIndexLoad; // Block exit while loading the index. - if (EnableIndex && !YamlSymbolFile.empty()) { + if (EnableIndex && !IndexFile.empty()) { // Load the index asynchronously. Meanwhile SwapIndex returns no results. SwapIndex *Placeholder; StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique<MemIndex>())); AsyncIndexLoad = runAsync<void>([Placeholder, &Opts] { - if (auto Idx = loadIndex(YamlSymbolFile, Opts.URISchemes, UseDex)) + if (auto Idx = loadIndex(IndexFile, Opts.URISchemes, UseDex)) Placeholder->reset(std::move(Idx)); }); if (RunSynchronously)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits