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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141944 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index e9ab78d..75300b5 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -1230,7 +1230,7 @@
bool HasStatic = (C.getArgs().hasArg(options::OPT_mkernel) ||
C.getArgs().hasArg(options::OPT_static) ||
C.getArgs().hasArg(options::OPT_fapple_kext));
- bool IsDarwin = TC->getTriple().getOS() == llvm::Triple::Darwin;
+ bool IsDarwin = TC->getTriple().isOSDarwin();
bool IsIADefault = TC->IsIntegratedAssemblerDefault() &&
!(HasStatic && IsDarwin);
if (C.getArgs().hasFlag(options::OPT_integrated_as,
@@ -1557,6 +1557,8 @@
case llvm::Triple::AuroraUX:
return createAuroraUXHostInfo(*this, Triple);
case llvm::Triple::Darwin:
+ case llvm::Triple::MacOSX:
+ case llvm::Triple::IOS:
return createDarwinHostInfo(*this, Triple);
case llvm::Triple::DragonFly:
return createDragonFlyHostInfo(*this, Triple);