[clangd] Put direct headers into srcs section.
authorKadir Cetinkaya <kadircet@google.com>
Tue, 27 Nov 2018 16:08:53 +0000 (16:08 +0000)
committerKadir Cetinkaya <kadircet@google.com>
Tue, 27 Nov 2018 16:08:53 +0000 (16:08 +0000)
commitd08eab42811f8146527d061be456cd1d80867f09
tree0193cc0f8ddd2745a66ece039f029fc378fa16e6
parent5f4feea9106f6338e34e91afae6a6cb1abd49339
[clangd] Put direct headers into srcs section.

Summary:
Currently, there's no way of knowing about header files
using compilation database, since it doesn't contain header files as entries.

Using this information, restoring from cache using compile commands becomes
possible instead of doing directory traversal. Also, we can issue indexing
actions for out-of-date headers even if source files depending on them haven't
changed.

Reviewers: sammccall

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D54817

llvm-svn: 347669
clang-tools-extra/clangd/Headers.h
clang-tools-extra/clangd/SourceCode.cpp
clang-tools-extra/clangd/SourceCode.h
clang-tools-extra/clangd/index/Background.cpp
clang-tools-extra/clangd/index/Background.h
clang-tools-extra/clangd/index/Serialization.cpp
clang-tools-extra/clangd/index/Serialization.h
clang-tools-extra/unittests/clangd/BackgroundIndexTests.cpp
clang-tools-extra/unittests/clangd/SerializationTests.cpp