[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.
This commit is contained in:
Jan Svoboda
2025-09-26 14:53:29 -07:00
committed by GitHub
parent 098767cafa
commit 1aefabe554

View File

@@ -672,9 +672,8 @@ OptionalFileEntryRef DirectoryLookup::DoFrameworkLookup(
if (getDirCharacteristic() == SrcMgr::C_User) {
SmallString<1024> SystemFrameworkMarker(FrameworkName);
SystemFrameworkMarker += ".system_framework";
if (llvm::sys::fs::exists(SystemFrameworkMarker)) {
if (FileMgr.getOptionalFileRef(SystemFrameworkMarker))
CacheEntry.IsUserSpecifiedSystemFramework = true;
}
}
}