https://github.com/jansvoboda11 created 
https://github.com/llvm/llvm-project/pull/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.

>From 72bc29f83e9efc273790384e4a274311e474318b Mon Sep 17 00:00:00 2001
From: Jan Svoboda <[email protected]>
Date: Fri, 26 Sep 2025 13:38:12 -0700
Subject: [PATCH] [clang] Use the VFS to check the system framework marker

---
 clang/lib/Lex/HeaderSearch.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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;
-      }
     }
   }
 

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to