diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index 6c978a0244b..20531b15efd 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -600,15 +600,15 @@ void Triple::getiOSVersion(unsigned &Major, unsigned &Minor, // the clang driver combines OS X and IOS support into a common Darwin // toolchain that wants to know the iOS version number even when targeting // OS X. - Major = 3; + Major = 5; Minor = 0; Micro = 0; break; case IOS: getOSVersion(Major, Minor, Micro); - // Default to 3.0. + // Default to 5.0. if (Major == 0) - Major = 3; + Major = 5; break; } } diff --git a/unittests/ADT/TripleTest.cpp b/unittests/ADT/TripleTest.cpp index b4028963908..a32a2312986 100644 --- a/unittests/ADT/TripleTest.cpp +++ b/unittests/ADT/TripleTest.cpp @@ -417,7 +417,7 @@ TEST(TripleTest, getOSVersion) { EXPECT_EQ((unsigned)5, Minor); EXPECT_EQ((unsigned)0, Micro); T.getiOSVersion(Major, Minor, Micro); - EXPECT_EQ((unsigned)3, Major); + EXPECT_EQ((unsigned)5, Major); EXPECT_EQ((unsigned)0, Minor); EXPECT_EQ((unsigned)0, Micro); @@ -432,7 +432,7 @@ TEST(TripleTest, getOSVersion) { EXPECT_EQ((unsigned)5, Minor); EXPECT_EQ((unsigned)0, Micro); T.getiOSVersion(Major, Minor, Micro); - EXPECT_EQ((unsigned)3, Major); + EXPECT_EQ((unsigned)5, Major); EXPECT_EQ((unsigned)0, Minor); EXPECT_EQ((unsigned)0, Micro); @@ -447,7 +447,7 @@ TEST(TripleTest, getOSVersion) { EXPECT_EQ((unsigned)4, Minor); EXPECT_EQ((unsigned)0, Micro); T.getiOSVersion(Major, Minor, Micro); - EXPECT_EQ((unsigned)3, Major); + EXPECT_EQ((unsigned)5, Major); EXPECT_EQ((unsigned)0, Minor); EXPECT_EQ((unsigned)0, Micro); @@ -462,7 +462,7 @@ TEST(TripleTest, getOSVersion) { EXPECT_EQ((unsigned)7, Minor); EXPECT_EQ((unsigned)0, Micro); T.getiOSVersion(Major, Minor, Micro); - EXPECT_EQ((unsigned)3, Major); + EXPECT_EQ((unsigned)5, Major); EXPECT_EQ((unsigned)0, Minor); EXPECT_EQ((unsigned)0, Micro); @@ -477,11 +477,11 @@ TEST(TripleTest, getOSVersion) { EXPECT_EQ((unsigned)4, Minor); EXPECT_EQ((unsigned)0, Micro); T.getiOSVersion(Major, Minor, Micro); - EXPECT_EQ((unsigned)3, Major); + EXPECT_EQ((unsigned)5, Major); EXPECT_EQ((unsigned)0, Minor); EXPECT_EQ((unsigned)0, Micro); - T = Triple("armv7-apple-ios5.0"); + T = Triple("armv7-apple-ios7.0"); EXPECT_FALSE(T.isMacOSX()); EXPECT_TRUE(T.isiOS()); EXPECT_FALSE(T.isArch16Bit()); @@ -492,7 +492,7 @@ TEST(TripleTest, getOSVersion) { EXPECT_EQ((unsigned)4, Minor); EXPECT_EQ((unsigned)0, Micro); T.getiOSVersion(Major, Minor, Micro); - EXPECT_EQ((unsigned)5, Major); + EXPECT_EQ((unsigned)7, Major); EXPECT_EQ((unsigned)0, Minor); EXPECT_EQ((unsigned)0, Micro); }