[PATCH] D39843: [clangd] Use in-memory preambles in clangd.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 15 03:22:12 PST 2017
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
As discussed, we should probably bundle together some related options into structs to make plumbing easier. Not a blocker here though.
If these options are pure-data, I think it's OK if some layers end up with access to other layers' options.
================
Comment at: clangd/ClangdUnit.cpp:238
if (Preamble) {
- Preamble->AddImplicitPreamble(*CI, Buffer.get());
+ Preamble->AddImplicitPreamble(*CI, /*ref*/ VFS, Buffer.get());
} else {
----------------
ref is still here :-)
================
Comment at: clangd/tool/ClangdMain.cpp:48
+static llvm::cl::opt<bool> StorePreamblesInMemory(
+ "in-memory-pchs",
----------------
Couple of questions about the flag syntax:
- I wonder about the granularity - if we had another temp storage (indexes?), would we want another flag or something shared like `-in-memory-storage`
- Having this as a bool seems confusing compared to `-pch-storage={memory/disk}`. (We could also overload such a flag to allow setting the location, but nobody's asked for that yet)
https://reviews.llvm.org/D39843
More information about the cfe-commits
mailing list