r210584 - Fix crash with x86_64-pc-win32-macho target. <rdar://problem/17235840>
Bob Wilson
bob.wilson at apple.com
Tue Jun 10 14:07:12 PDT 2014
Author: bwilson
Date: Tue Jun 10 16:07:12 2014
New Revision: 210584
URL: http://llvm.org/viewvc/llvm-project?rev=210584&view=rev
Log:
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.
Added:
cfe/trunk/test/Misc/win32-macho.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=210584&r1=210583&r2=210584&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Tue Jun 10 16:07:12 2014
@@ -472,7 +472,8 @@ void InitHeaderSearch::AddDefaultInclude
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;
}
Added: cfe/trunk/test/Misc/win32-macho.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/win32-macho.c?rev=210584&view=auto
==============================================================================
--- cfe/trunk/test/Misc/win32-macho.c (added)
+++ cfe/trunk/test/Misc/win32-macho.c Tue Jun 10 16:07:12 2014
@@ -0,0 +1,2 @@
+// Check that basic use of win32-macho targets works.
+// RUN: %clang -c -target x86_64-pc-win32-macho %s
More information about the cfe-commits
mailing list