[PATCH] D64018: [clangd] Store hash of command line in index shards.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 2 00:36:41 PDT 2019


sammccall added a comment.

This makes sense but is hard to debug - is there a reason we don't just store (the relevant parts of) the actual compile command? Size?



================
Comment at: clang-tools-extra/clangd/index/Background.cpp:434
   SPAN_ATTACH(Tracer, "file", Cmd.Filename);
+  size_t CmdHash =
+      llvm::hash_combine(Cmd.Filename, llvm::join(Cmd.CommandLine, ""),
----------------
only CommandLine and Directory are relevant.
Heuristic and Output don't affect anything, and Filename is already part of the storage key.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64018/new/

https://reviews.llvm.org/D64018





More information about the cfe-commits mailing list