================
@@ -3229,16 +3244,7 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions 
&Opts, ArgList &Args,
         IsIndexHeaderMap ? frontend::IndexHeaderMap : frontend::Angled;
 
     bool IsFramework = A->getOption().matches(OPT_F);
-    std::string Path = A->getValue();
-
-    if (IsSysrootSpecified && !IsFramework && A->getValue()[0] == '=') {
-      SmallString<32> Buffer;
-      llvm::sys::path::append(Buffer, Opts.Sysroot,
-                              llvm::StringRef(A->getValue()).substr(1));
-      Path = std::string(Buffer);
-    }
-
-    Opts.AddPath(Path, Group, IsFramework,
+    Opts.AddPath(ConvertHeaderPath(A, IsFramework), Group, IsFramework,
----------------
jansvoboda11 wrote:

Instead of prefixing the path with sysroot here, would it make sense to defer 
to `InitHeaderSearch::AddPath()` by calling `Opts.AddPath(..., 
/*IgnoreSysRoot=*/false)`? Note that this function only adds the prefix to 
absolute paths. Does that match GCC behavior?

https://github.com/llvm/llvm-project/pull/82084
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to