[clang] 1aefabe - [clang] Use the VFS to check the system framework marker (#160946)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 26 14:53:33 PDT 2025
Author: Jan Svoboda
Date: 2025-09-26T14:53:29-07:00
New Revision: 1aefabe5545bbf76a5218b998254033e71ed24f7
URL: https://github.com/llvm/llvm-project/commit/1aefabe5545bbf76a5218b998254033e71ed24f7
DIFF: https://github.com/llvm/llvm-project/commit/1aefabe5545bbf76a5218b998254033e71ed24f7.diff
LOG: [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.
Added:
Modified:
clang/lib/Lex/HeaderSearch.cpp
Removed:
################################################################################
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index f28a74f5d0ae5..ae09f70ee7896 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -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;
- }
}
}
More information about the cfe-commits
mailing list