summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/TripleTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT/TripleTest.cpp')
-rw-r--r--llvm/unittests/ADT/TripleTest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/TripleTest.cpp b/llvm/unittests/ADT/TripleTest.cpp
index 2e9d585b5dc..dfc99837d4b 100644
--- a/llvm/unittests/ADT/TripleTest.cpp
+++ b/llvm/unittests/ADT/TripleTest.cpp
@@ -564,4 +564,16 @@ TEST(TripleTest, NormalizeWindows) {
EXPECT_EQ("i686-pc-windows-elf", Triple::normalize("i686-pc-windows-elf-elf"));
}
+
+TEST(TripleTest, getARMCPUForArch) {
+ {
+ llvm::Triple Triple("armv7s-apple-ios7");
+ EXPECT_STREQ("swift", Triple.getARMCPUForArch());
+ }
+ {
+ llvm::Triple Triple("armv7-apple-ios7");
+ EXPECT_STREQ("cortex-a8", Triple.getARMCPUForArch());
+ EXPECT_STREQ("swift", Triple.getARMCPUForArch("armv7s"));
+ }
+}
}
OpenPOWER on IntegriCloud