Set default CPU for OpenBSD/arm to Cortex-A8

llvm-svn: 296493
This commit is contained in:
Brad Smith 2017-02-28 17:28:35 +00:00
parent 3246aecb42
commit 159f3bb80e
2 changed files with 5 additions and 0 deletions

View File

@ -1515,6 +1515,7 @@ StringRef Triple::getARMCPUForArch(StringRef MArch) const {
return "strongarm";
}
case llvm::Triple::NaCl:
case llvm::Triple::OpenBSD:
return "cortex-a8";
default:
switch (getEnvironment()) {

View File

@ -1017,6 +1017,10 @@ TEST(TripleTest, getARMCPUForArch) {
llvm::Triple Triple("arm--nacl");
EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("arm--openbsd");
EXPECT_EQ("cortex-a8", Triple.getARMCPUForArch());
}
{
llvm::Triple Triple("armv6-unknown-freebsd");
EXPECT_EQ("arm1176jzf-s", Triple.getARMCPUForArch());