[PATCH] D39842: Allow to store precompiled preambles in memory.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 9 06:59:27 PST 2017


ilya-biryukov created this revision.

These preambles are built by ASTUnit and clangd. Previously, preambles
were always stored on disk.

In-memory preambles are routed back to the compiler as virtual files in
a custom VFS.

Interface of ASTUnit does not allow to use in-memory preambles, as
ASTUnit::CodeComplete receives FileManager as a parameter, so we can't
change VFS used by the compiler inside the CodeComplete method.

A follow-up commit will update clangd in clang-tools-extra to use
in-memory preambles.

Proper variant-like storage for Preambles.

Final fixes and adjustments.


https://reviews.llvm.org/D39842

Files:
  include/clang/Frontend/FrontendActions.h
  include/clang/Frontend/PrecompiledPreamble.h
  lib/Frontend/ASTUnit.cpp
  lib/Frontend/FrontendActions.cpp
  lib/Frontend/PrecompiledPreamble.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39842.122244.patch
Type: text/x-patch
Size: 24330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171109/17a5be42/attachment-0001.bin>


More information about the cfe-commits mailing list