[PATCH] D52976: [clangd] Update the out-of-date yaml-symbol-file flag in clangd.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 8 02:39:37 PDT 2018
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov.
The flag is stale due to the recent changes of clangd indexer, this
patch rename it to "index-file".
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,10 @@
"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.\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 +287,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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52976.168626.patch
Type: text/x-patch
Size: 1541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181008/74991032/attachment-0001.bin>
More information about the cfe-commits
mailing list