Fix crash with x86_64-pc-win32-macho target. <rdar://problem/17235840>

The changes in r204978 broke win32-macho targets. There were checks added for
MSVC and Itanium environments as special cases, and win32-macho needs to be
treated the same way.

llvm-svn: 210584
This commit is contained in:
Bob Wilson 2014-06-10 21:07:12 +00:00
parent 73429fd4a6
commit 07216a1161
2 changed files with 4 additions and 1 deletions

View File

@ -472,7 +472,8 @@ void InitHeaderSearch::AddDefaultIncludePaths(const LangOptions &Lang,
case llvm::Triple::Win32:
if (triple.getEnvironment() == llvm::Triple::MSVC ||
triple.getEnvironment() == llvm::Triple::Itanium)
triple.getEnvironment() == llvm::Triple::Itanium ||
triple.getObjectFormat() == llvm::Triple::MachO)
return;
break;
}

View File

@ -0,0 +1,2 @@
// Check that basic use of win32-macho targets works.
// RUN: %clang -c -target x86_64-pc-win32-macho %s