[PATCH] D39843: [clangd] Use in-memory preambles in clangd.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 9 06:59:58 PST 2017
ilya-biryukov created this revision.
https://reviews.llvm.org/D39843
Files:
clangd/ClangdUnit.cpp
Index: clangd/ClangdUnit.cpp
===================================================================
--- clangd/ClangdUnit.cpp
+++ clangd/ClangdUnit.cpp
@@ -235,7 +235,7 @@
// NOTE: we use Buffer.get() when adding remapped files, so we have to make
// sure it will be released if no error is emitted.
if (Preamble) {
- Preamble->AddImplicitPreamble(*CI, Buffer.get());
+ Preamble->AddImplicitPreamble(*CI, /*ref*/ VFS, Buffer.get());
} else {
CI->getPreprocessorOpts().addRemappedFile(
CI->getFrontendOpts().Inputs[0].getFile(), Buffer.get());
@@ -1301,7 +1301,7 @@
CppFilePreambleCallbacks SerializedDeclsCollector;
auto BuiltPreamble = PrecompiledPreamble::Build(
*CI, ContentsBuffer.get(), Bounds, *PreambleDiagsEngine, VFS, PCHs,
- SerializedDeclsCollector);
+ /*StoreInMemory=*/true, SerializedDeclsCollector);
if (BuiltPreamble) {
return std::make_shared<PreambleData>(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39843.122245.patch
Type: text/x-patch
Size: 965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171109/feea214b/attachment.bin>
More information about the cfe-commits
mailing list