[Driver] move Fuchsia header search path management to the driver
authorBrad Smith <brad@comstyle.com>
Fri, 6 Jan 2023 02:18:12 +0000 (21:18 -0500)
committerBrad Smith <brad@comstyle.com>
Fri, 6 Jan 2023 02:21:08 +0000 (21:21 -0500)
Fuchsia already implements AddClangSystemIncludeArgs(). So it looks like we
just have to switch over to using it.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D141073

clang/lib/Lex/InitHeaderSearch.cpp

index 8dc5d95..d55746b 100644 (file)
@@ -235,7 +235,6 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
     case llvm::Triple::PS4:
     case llvm::Triple::PS5:
     case llvm::Triple::ELFIAMCU:
-    case llvm::Triple::Fuchsia:
       break;
     case llvm::Triple::Win32:
       if (triple.getEnvironment() != llvm::Triple::Cygnus)
@@ -338,7 +337,6 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
   case llvm::Triple::RTEMS:
   case llvm::Triple::NaCl:
   case llvm::Triple::ELFIAMCU:
-  case llvm::Triple::Fuchsia:
     break;
   case llvm::Triple::PS4:
   case llvm::Triple::PS5: {
@@ -413,6 +411,7 @@ bool InitHeaderSearch::ShouldAddDefaultIncludePaths(
   case llvm::Triple::FreeBSD:
   case llvm::Triple::NetBSD:
   case llvm::Triple::OpenBSD:
+  case llvm::Triple::Fuchsia:
   case llvm::Triple::Hurd:
   case llvm::Triple::Linux:
   case llvm::Triple::Solaris: