summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2018-10-08 10:44:54 +0000
committerHaojian Wu <hokein@google.com>2018-10-08 10:44:54 +0000
commit162510f61991171ecef7f8c47db732fcc4e7b85e (patch)
tree0918bedfa366bbf1da58a439ffad5856be666318
parent57f5d0a885cf05d57da946cf5cf13ead2cb077b1 (diff)
downloadbcm5719-llvm-162510f61991171ecef7f8c47db732fcc4e7b85e.tar.gz
bcm5719-llvm-162510f61991171ecef7f8c47db732fcc4e7b85e.zip
[clangd] Update the out-of-date yaml-symbol-file flag in clangd.
Summary: The flag is stale due to the recent changes of clangd indexer, this patch renames the flag to "index-file". Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52976 llvm-svn: 343963
-rw-r--r--clang-tools-extra/clangd/tool/ClangdMain.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index aebff518932..a7a9fddcc73 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -158,11 +158,11 @@ static llvm::cl::opt<bool> HeaderInsertionDecorators(
"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 @@ int main(int argc, char *argv[]) {
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)
OpenPOWER on IntegriCloud