[PATCH] D77309: [clangd] Get rid of ASTWorker::getCurrentFileInputs

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 2 08:06:27 PDT 2020


kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov.
Herald added a project: clang.
kadircet added a parent revision: D76725: [clangd] Build ASTs only with fresh preambles or after building a new preamble.

FileInputs are only written by ASTWorker thread, therefore it is safe
to read them without the lock inside that thread. It can still be read by other
threads through ASTWorker::getCurrentCompileCommand though.

This patch also gets rid of the smart pointer wrapping FileInputs as there is
never mutliple owners.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77309

Files:
  clang-tools-extra/clangd/TUScheduler.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77309.254526.patch
Type: text/x-patch
Size: 5381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200402/95725359/attachment-0001.bin>


More information about the cfe-commits mailing list