Skip to content

Commit 1aefabe

Browse files
authored
[clang] Use the VFS to check the system framework marker (#160946)
This PR uses the VFS/`FileManager` to check the system framework marker instead of going straight to the real file system. This matches the behavior of other input files of the compiler.
1 parent 098767c commit 1aefabe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Lex/HeaderSearch.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,9 +672,8 @@ OptionalFileEntryRef DirectoryLookup::DoFrameworkLookup(
672672
if (getDirCharacteristic() == SrcMgr::C_User) {
673673
SmallString<1024> SystemFrameworkMarker(FrameworkName);
674674
SystemFrameworkMarker += ".system_framework";
675-
if (llvm::sys::fs::exists(SystemFrameworkMarker)) {
675+
if (FileMgr.getOptionalFileRef(SystemFrameworkMarker))
676676
CacheEntry.IsUserSpecifiedSystemFramework = true;
677-
}
678677
}
679678
}
680679

0 commit comments

Comments
 (0)