Darwin: update default iOS version to 5.0

Defaulting to iOS 3.0 when LLVM has to guess the version is no longer a useful
option and can give surprising results (like tail calls being disabled).

5.0 seems like a reasonable compromise as a platform that's still interesting
to some people.

rdar://problem/15567348

llvm-svn: 196912
This commit is contained in:
Tim Northover 2013-12-10 11:53:16 +00:00
parent 17b23098ee
commit 3e8df696ea
2 changed files with 10 additions and 10 deletions

View File

@ -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;
}
}

View File

@ -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);
}