[PATCH] D145974: [libclang] Add index option to store preambles in memory

Igor Kushnir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 13 11:47:09 PDT 2023


vedgy created this revision.
Herald added a subscriber: arphaman.
Herald added a project: All.
vedgy requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This commit allows libclang API users to opt into storing PCH in memory
instead of temporary files. The option can be set only during CXIndex
construction to avoid multithreading issues and confusion or bugs if
some preambles are stored in temporary files and others - in memory.

The added API works as expected in KDevelop:
https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/283


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145974

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang-c/Index.h
  clang/include/clang/Frontend/ASTUnit.h
  clang/lib/Frontend/ASTUnit.cpp
  clang/tools/libclang/CIndex.cpp
  clang/tools/libclang/CIndexer.h
  clang/unittests/Frontend/ASTUnitTest.cpp
  clang/unittests/libclang/LibclangTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145974.504781.patch
Type: text/x-patch
Size: 10290 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230313/8ac2855b/attachment.bin>


More information about the cfe-commits mailing list