[clang] Add support for sysroot-relative system header search paths (PR #82084)

Evan Wilde via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 13:15:38 PDT 2024


================
@@ -3256,12 +3262,14 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args,
   }
 
   for (const auto *A : Args.filtered(OPT_idirafter))
-    Opts.AddPath(A->getValue(), frontend::After, false, true);
+    Opts.AddPath(ConvertHeaderPath(A), frontend::After, false, true);
   for (const auto *A : Args.filtered(OPT_iquote))
-    Opts.AddPath(A->getValue(), frontend::Quoted, false, true);
-  for (const auto *A : Args.filtered(OPT_isystem, OPT_iwithsysroot))
+    Opts.AddPath(ConvertHeaderPath(A), frontend::Quoted, false, true);
+  for (const auto *A : Args.filtered(OPT_iwithsysroot))
     Opts.AddPath(A->getValue(), frontend::System, false,
-                 !A->getOption().matches(OPT_iwithsysroot));
+                 /*IgnoreSysRoot=*/false);
+  for (const auto *A : Args.filtered(OPT_isystem))
----------------
etcwilde wrote:

Fixed

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


More information about the cfe-commits mailing list