[PATCH] D30882: Add a callback for __has_include and use it for dependency scanning
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 14 17:38:39 PDT 2018
rsmith accepted this revision.
rsmith added inline comments.
================
Comment at: clang/lib/Frontend/DependencyFile.cpp:340
+ return;
+ StringRef Filename = File->getName();
+ if (!FileMatchesDepCriteria(Filename.data(), FileType))
----------------
vsapsai wrote:
> rsmith wrote:
> > Should we really be using the (arbitrary) name of the file from the `FileEntry` rather than the name as written? It looks like the corresponding code for `InclusionDirective` uses the name as written instead.
> `InclusionDirective` covers only cases when file is not found. Existing files are handled in `FileChanged`. Advantage of using `File->getName()` is that for input with absolute paths file name will be absolute too.
Ah right, that makes sense.
https://reviews.llvm.org/D30882
More information about the cfe-commits
mailing list