Skip to content

Commit

Permalink
Fix crash with x86_64-pc-win32-macho target. <rdar://problem/17235840>
Browse files Browse the repository at this point in the history
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210584 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
bob-wilson committed Jun 10, 2014
1 parent fcb877c commit 3819339
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Frontend/InitHeaderSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/Misc/win32-macho.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Check that basic use of win32-macho targets works.
// RUN: %clang -c -target x86_64-pc-win32-macho %s

0 comments on commit 3819339

Please sign in to comment.