Skip to content

Commit 10ea99a

Browse files
committed
[llvm] Use the VFS to get the real path in FileCollector (llvm#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.
1 parent 158b2ae commit 10ea99a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Support/FileCollector.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ void FileCollector::PathCanonicalizer::updateWithRealPath(
6868
SmallString<256> RealPath;
6969
auto DirWithSymlink = CachedDirs.find(Directory);
7070
if (DirWithSymlink == CachedDirs.end()) {
71-
// FIXME: Should this be a call to FileSystem::getRealpath(), in some
72-
// cases? What if there is nothing on disk?
73-
if (sys::fs::real_path(Directory, RealPath))
71+
// FIXME: What if there is nothing on disk?
72+
if (VFS->getRealPath(Directory, RealPath))
7473
return;
7574
CachedDirs[Directory] = std::string(RealPath);
7675
} else {

0 commit comments

Comments
 (0)