This is to enable cache invalidation when command line flags changes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 34204 Build 34203: arc lint + arc unit
Event Timeline
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?
clang-tools-extra/clangd/index/Background.cpp | ||
---|---|---|
434 | only CommandLine and Directory are relevant. |
Yes I had the size in mind, also didn't see any use case for the actual compile commands.
As for size, I suppose it is OK to store the whole command as it is only stored for the main file of a TU.
Still LG
clang-tools-extra/clangd/index/Serialization.h | ||
---|---|---|
48 | Need to document that this contains only Directory and CommandLine (or use another struct) |
clang-tools-extra/clangd/index/Serialization.cpp | ||
---|---|---|
419 | the packed ArrayRef is a bit weird here. |
only CommandLine and Directory are relevant.
Heuristic and Output don't affect anything, and Filename is already part of the storage key.