]> granicus.if.org Git - clang/commitdiff
[x86] Exclusion of incorrect include headers paths for MCU target
authorAndrey Bokhanko <andreybokhanko@gmail.com>
Wed, 16 Dec 2015 13:27:38 +0000 (13:27 +0000)
committerAndrey Bokhanko <andreybokhanko@gmail.com>
Wed, 16 Dec 2015 13:27:38 +0000 (13:27 +0000)
Exclusion of /usr/include and /usr/local/include headers paths for MCU target.

Differential Revision: http://reviews.llvm.org/D14954

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255766 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/InitHeaderSearch.cpp
test/Driver/elfiamcu-header-search.c [new file with mode: 0644]

index 1de46271d1937fe2d04b1b2563579509a9b0125b..70afbc7476c1b3e400140139a4c907a78178e889 100644 (file)
@@ -216,6 +216,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
     case llvm::Triple::Bitrig:
     case llvm::Triple::NaCl:
     case llvm::Triple::PS4:
+    case llvm::Triple::ELFIAMCU:
       break;
     case llvm::Triple::Win32:
       if (triple.getEnvironment() != llvm::Triple::Cygnus)
@@ -318,6 +319,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
   case llvm::Triple::CloudABI:
   case llvm::Triple::RTEMS:
   case llvm::Triple::NaCl:
+  case llvm::Triple::ELFIAMCU:
     break;
   case llvm::Triple::PS4: {
     // <isysroot> gets prepended later in AddPath().
diff --git a/test/Driver/elfiamcu-header-search.c b/test/Driver/elfiamcu-header-search.c
new file mode 100644 (file)
index 0000000..6e87682
--- /dev/null
@@ -0,0 +1,6 @@
+// REQUIRES: x86-registered-target
+
+// RUN: %clang -target i386-pc-elfiamcu -c -v %s 2>&1 | FileCheck %s
+// CHECK-NOT: /usr/include
+// CHECK-NOT: /usr/local/include
+