summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@comstyle.com>2017-04-22 16:34:38 +0000
committerBrad Smith <brad@comstyle.com>2017-04-22 16:34:38 +0000
commit200fcffe88bb34747245a82483cb1a3254dd492c (patch)
treecbead784feb99669ca81f4b6d962b49de0ec6108
parentMerging r298604: (diff)
downloadllvm-project-200fcffe88bb34747245a82483cb1a3254dd492c.tar.gz
llvm-project-200fcffe88bb34747245a82483cb1a3254dd492c.tar.bz2
llvm-project-200fcffe88bb34747245a82483cb1a3254dd492c.zip
Merging r296493:
------------------------------------------------------------------------ r296493 | brad | 2017-02-28 12:28:35 -0500 (Tue, 28 Feb 2017) | 2 lines Set default CPU for OpenBSD/arm to Cortex-A8 ------------------------------------------------------------------------ llvm-svn: 301082
-rw-r--r--llvm/lib/Support/Triple.cpp1
-rw-r--r--llvm/unittests/ADT/TripleTest.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index 6783b40a125d..9cf2d5d3fcd4 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -1511,6 +1511,7 @@ StringRef Triple::getARMCPUForArch(StringRef MArch) const {
return "strongarm";
}
case llvm::Triple::NaCl:
+ case llvm::Triple::OpenBSD:
return "cortex-a8";
default:
switch (getEnvironment()) {
diff --git a/llvm/unittests/ADT/TripleTest.cpp b/llvm/unittests/ADT/TripleTest.cpp
index c80477f6ddc9..31d5b93ae392 100644
--- a/llvm/unittests/ADT/TripleTest.cpp
+++ b/llvm/unittests/ADT/TripleTest.cpp
@@ -948,6 +948,10 @@ TEST(TripleTest, getARMCPUForArch) {
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());
}