Use Triple.isOSDarwin() instead of comparing against Triple::Darwin.
There are now separate Triple::MacOSX and Triple::IOS values for the OS
so comparing against Triple::Darwin will fail to match those. Note that
I changed the expected output for the Driver/rewrite-objc.m test, which had
previously not been passing Darwin-specific options with the macosx triple.
llvm-svn: 141944
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index 1edb56a..0fa25fb 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -200,7 +200,7 @@
// Fallback to llvm-gcc for i386 kext compiles, we don't support that ABI.
if (Inputs.size() == 1 &&
types::isCXX(Inputs[0]->getType()) &&
- getTriple().getOS() == llvm::Triple::Darwin &&
+ getTriple().isOSDarwin() &&
getTriple().getArch() == llvm::Triple::x86 &&
(C.getArgs().getLastArg(options::OPT_fapple_kext) ||
C.getArgs().getLastArg(options::OPT_mkernel)))