Set default CPU for OpenBSD/arm to Cortex-A8

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296493 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brad Smith 2017-02-28 17:28:35 +00:00
parent a786b77c39
commit 6bca79c2f9
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());