[clangd] Drop usage of PreambleStatCache in scanPreamble
authorKadir Cetinkaya <kadircet@google.com>
Wed, 17 Jun 2020 16:09:54 +0000 (18:09 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Fri, 19 Jun 2020 10:36:49 +0000 (12:36 +0200)
commitd2fcc586223c522098df7a627e87a6a6c8381fbe
tree56e737af80f28d44da31c49554fe93198101d66f
parent498de090441e8281196aaa8b065ebd1dddd6a01d
[clangd] Drop usage of PreambleStatCache in scanPreamble

Summary: It was used inside buildCompilerInvocation to speed up stats. But
preambleStatCache doesn't contain stat information performed while
building compiler invocation. So it was an unnecessary optimization.

Furthermore, buildCompilerInvocation in scanPreamble doesn't need to
find gcc installation, include paths and such, as it is only trying to
lex directives. Hence we are passing an empty FS to get rid of any
redundant IO.

Reviewers: sammccall

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81719
clang-tools-extra/clangd/Preamble.cpp