forked from OSchip/llvm-project
4dc5573acc
when the FileManager is reused across invocations This commit introduces a parallel API to FileManager's getFile: getFileEntryRef, which returns a reference to the FileEntry, and the name that was used to access the file. In the case of a VFS with 'use-external-names', the FileEntyRef contains the external name of the file, not the filename that was used to access it. The new API is adopted only in the HeaderSearch and Preprocessor for include file lookup, so that the accessed path can be propagated to SourceManager's FileInfo. SourceManager's FileInfo now can report this accessed path, using the new getName method. This API is then adopted in the dependency collector, which now correctly reports dependencies when a file is included both using a symlink and a real path in the case when the FileManager is reused across multiple Preprocessor invocations. Note that this patch does not fix all dependency collector issues, as the same problem is still present in other cases when dependencies are obtained using FileSkipped, InclusionDirective, and HasInclude. This will be fixed in follow-up commits. Differential Revision: https://reviews.llvm.org/D65907 llvm-svn: 369680 |
||
---|---|---|
.. | ||
Inputs | ||
external-names.c | ||
framework-import.m | ||
implicit-include.c | ||
include-mixed-real-and-virtual.c | ||
include-real-from-virtual.c | ||
include-virtual-from-real.c | ||
include.c | ||
incomplete-umbrella.m | ||
module-import.m | ||
module_missing_vfs.m | ||
parse-errors.c | ||
real-path-found-first.m | ||
relative-path.c | ||
subframework-symlink.m | ||
test_nonmodular.c | ||
umbrella-framework-import-skipnonexist.m | ||
umbrella-mismatch.m | ||
vfsroot-include.c | ||
vfsroot-module.m | ||
vfsroot-with-overlay.c |