[llvm] Use the VFS to get the real path in FileCollector (#160943)
This PR starts using the correct VFS for getting file's real path in `FileCollector` instead of using the real FS directly. This matches compiler's behavior for other input files.
This commit is contained in:
parent
dd3507b6c0
commit
f9dbf738d8
@ -68,9 +68,8 @@ void FileCollector::PathCanonicalizer::updateWithRealPath(
|
||||
SmallString<256> RealPath;
|
||||
auto DirWithSymlink = CachedDirs.find(Directory);
|
||||
if (DirWithSymlink == CachedDirs.end()) {
|
||||
// FIXME: Should this be a call to FileSystem::getRealpath(), in some
|
||||
// cases? What if there is nothing on disk?
|
||||
if (sys::fs::real_path(Directory, RealPath))
|
||||
// FIXME: What if there is nothing on disk?
|
||||
if (VFS->getRealPath(Directory, RealPath))
|
||||
return;
|
||||
CachedDirs[Directory] = std::string(RealPath);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user