From: Andrey Bokhanko Date: Wed, 16 Dec 2015 13:27:38 +0000 (+0000) Subject: [x86] Exclusion of incorrect include headers paths for MCU target X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=791a40edf62894f272cad36a9afb157d61353f6c;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255766 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp index 1de46271d1..70afbc7476 100644 --- a/lib/Frontend/InitHeaderSearch.cpp +++ b/lib/Frontend/InitHeaderSearch.cpp @@ -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: { // 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 index 0000000000..6e87682508 --- /dev/null +++ b/test/Driver/elfiamcu-header-search.c @@ -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 +