[PATCH] D154388: Don't pass -ibuiltininc, which is used only by the driver, to CC1

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 5 14:03:42 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
ahatanak marked an inline comment as done.
Closed by commit rGa2b7297dff34: Don't pass -ibuiltininc, which is used only by the driver, to CC1 (authored by ahatanak).

Changed prior to commit:
  https://reviews.llvm.org/D154388?vs=536884&id=537488#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154388/new/

https://reviews.llvm.org/D154388

Files:
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/darwin-header-search-system.cpp


Index: clang/test/Driver/darwin-header-search-system.cpp
===================================================================
--- clang/test/Driver/darwin-header-search-system.cpp
+++ clang/test/Driver/darwin-header-search-system.cpp
@@ -131,6 +131,7 @@
 // RUN:               -DRESOURCE=%S/Inputs/resource_dir \
 // RUN:               --check-prefix=CHECK-NOSTDINC-BUILTINC %s
 // CHECK-NOSTDINC-BUILTINC: "-cc1"
+// CHECK-NOSTDINC-BUILTINC-NOT: "-ibuiltininc"
 // CHECK-NOSTDINC-BUILTINC-NOT: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
 // CHECK-NOSTDINC-BUILTINC: "-internal-isystem" "[[RESOURCE]]/include"
 // CHECK-NOSTDINC-BUILTINC-NOT: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -1305,6 +1305,9 @@
     } else if (A->getOption().matches(options::OPT_stdlibxx_isystem)) {
       // Translated to -internal-isystem by the driver, no need to pass to cc1.
       continue;
+    } else if (A->getOption().matches(options::OPT_ibuiltininc)) {
+      // This is used only by the driver. No need to pass to cc1.
+      continue;
     }
 
     // Not translated, render as usual.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154388.537488.patch
Type: text/x-patch
Size: 1297 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230705/d47a1412/attachment-0001.bin>


More information about the cfe-commits mailing list