[clangd] Get rid of ASTWorker::getCurrentFileInputs
authorKadir Cetinkaya <kadircet@google.com>
Thu, 2 Apr 2020 14:35:15 +0000 (16:35 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Tue, 7 Apr 2020 11:48:00 +0000 (13:48 +0200)
commit4ac7b805b7c4aa7af0a82d6187e3bd6ac0cf38cd
tree8b187126e58ae38065c892b2346ebb3ecbd8cb43
parent7fc599ceb015c6456e48b79453df9ac1b2965123
[clangd] Get rid of ASTWorker::getCurrentFileInputs

Summary:
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.

Reviewers: sammccall

Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77309
clang-tools-extra/clangd/TUScheduler.cpp