]> granicus.if.org Git - clang/commit
Track skipped files in dependency scanning.
authorVolodymyr Sapsai <vsapsai@apple.com>
Tue, 1 May 2018 23:59:33 +0000 (23:59 +0000)
committerVolodymyr Sapsai <vsapsai@apple.com>
Tue, 1 May 2018 23:59:33 +0000 (23:59 +0000)
commitbb709adc10d4ab4d9f46457e0a5b82f84d2cbc94
tree1d9ab5c5502952fc5b2f5f57d8291f4f59b2f707
parentfd51227af0392ddc88aadb45b928387a9fad1ec8
Track skipped files in dependency scanning.

It's possible for a header to be a symlink to another header. In this
case both will be represented by clang::FileEntry with the same UID and
they'll use the same clang::HeaderFileInfo.

If you include both headers and use some single-inclusion mechanism
like a header guard or #import, one header will get a FileChanged
callback, and another FileSkipped.

So that we get an accurate dependency file, we therefore need to also
implement the FileSkipped callback in dependency scanning.

Patch by Pete Cooper.

Reviewers: bruno, pete

Reviewed By: bruno

Subscribers: cfe-commits, jkorous, vsapsai

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331319 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/DependencyFile.cpp
test/Frontend/Inputs/SystemHeaderPrefix/with-header-guard.h [new file with mode: 0644]
test/Frontend/dependency-gen-symlink.c [new file with mode: 0644]