[clang] [clang] use relative paths for builtin headers during module compilation (PR #68023)

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 20 12:34:45 PDT 2023


================
@@ -180,8 +180,9 @@ static void appendSubframeworkPaths(Module *Mod,
 OptionalFileEntryRef ModuleMap::findHeader(
     Module *M, const Module::UnresolvedHeaderDirective &Header,
     SmallVectorImpl<char> &RelativePathName, bool &NeedsFramework) {
-  // Search for the header file within the module's home directory.
-  auto Directory = M->Directory;
+  // Search for the header file within the module's home directory
+  // or the builtin include dir if this is a builtin header.
+  auto Directory = Header.HasBuiltinHeader ? BuiltinIncludeDir : M->Directory;
----------------
jansvoboda11 wrote:

Is this change still needed?

https://github.com/llvm/llvm-project/pull/68023


More information about the cfe-commits mailing list