vsapsai added inline comments.

================
Comment at: clang/lib/Frontend/DependencyFile.cpp:300-304
   StringRef Filename = FE->getName();
   if (!FileMatchesDepCriteria(Filename.data(), FileType))
     return;
 
   AddFilename(llvm::sys::path::remove_leading_dotslash(Filename));
----------------
This was the role model.


================
Comment at: clang/lib/Frontend/DependencyFile.cpp:340
+    return;
+  StringRef Filename = File->getName();
+  if (!FileMatchesDepCriteria(Filename.data(), FileType))
----------------
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.


https://reviews.llvm.org/D30882



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to