ARMv7k: use Cortex-A7 by default even for tvOS

Also actually test the default CPU from those triples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260621 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover 2016-02-11 23:49:08 +00:00
parent f7640fe2c1
commit aee93e78d1
2 changed files with 13 additions and 0 deletions

View File

@ -1412,6 +1412,7 @@ StringRef Triple::getARMCPUForArch(StringRef MArch) const {
case llvm::Triple::MacOSX:
case llvm::Triple::IOS:
case llvm::Triple::WatchOS:
case llvm::Triple::TvOS:
if (MArch == "v7k")
return "cortex-a7";
break;

View File

@ -982,6 +982,18 @@ TEST(TripleTest, getARMCPUForArch) {
llvm::Triple Triple("armv7s-apple-ios7");
EXPECT_EQ("swift", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7k-apple-ios9");
EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7k-apple-watchos3");
EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7k-apple-tvos9");
EXPECT_EQ("cortex-a7", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv7em-apple-ios7");
EXPECT_EQ("cortex-m4", Triple.getARMCPUForArch());