r255766 - [x86] Exclusion of incorrect include headers paths for MCU target

Andrey Bokhanko via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 16 05:27:38 PST 2015


Author: asbokhan
Date: Wed Dec 16 07:27:38 2015
New Revision: 255766

URL: http://llvm.org/viewvc/llvm-project?rev=255766&view=rev
Log:
[x86] Exclusion of incorrect include headers paths for MCU target

Exclusion of /usr/include and /usr/local/include headers paths for MCU target.

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

Added:
    cfe/trunk/test/Driver/elfiamcu-header-search.c
Modified:
    cfe/trunk/lib/Frontend/InitHeaderSearch.cpp

Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=255766&r1=255765&r2=255766&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Wed Dec 16 07:27:38 2015
@@ -216,6 +216,7 @@ void InitHeaderSearch::AddDefaultCInclud
     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::AddDefaultCInclud
   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().

Added: cfe/trunk/test/Driver/elfiamcu-header-search.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/elfiamcu-header-search.c?rev=255766&view=auto
==============================================================================
--- cfe/trunk/test/Driver/elfiamcu-header-search.c (added)
+++ cfe/trunk/test/Driver/elfiamcu-header-search.c Wed Dec 16 07:27:38 2015
@@ -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
+




More information about the cfe-commits mailing list