[PATCH] D30882: Add a callback for __has_include and use it for dependency scanning
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 14 16:29:40 PDT 2018
vsapsai marked 2 inline comments as done.
vsapsai added inline comments.
================
Comment at: lib/Frontend/DependencyFile.cpp:325
+void DFGImpl::HasInclude(SourceLocation Loc, const FileEntry *File) {
+ if (!File)
+ return;
----------------
rsmith wrote:
> Have you thought about whether we should add a dependency even for a missing file under `-MG` (`AddMissingHeaderDeps`) mode? I think it's probably better to not do so (ie, the behavior in this patch), but it seems worth considering.
Do you know how Make uses these missing files? Or maybe where I can find more. The only documentation I found says
> This feature is used in automatic updating of makefiles.
Which is not particularly illuminating.
Currently I prefer not to include not found `__has_include` files because they aren't really missing, it's OK if they aren't there and nothing has to be done to fix that. But I'd like to confirm if my understanding aligns with Make behaviour.
https://reviews.llvm.org/D30882
More information about the cfe-commits
mailing list