[llvm] r294096 - TripleTest.BitWidthArchVariants: add missing arch types (thumb, arm, le, ...)
Alex Denisov via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 4 10:20:21 PST 2017
Author: alexdenisov
Date: Sat Feb 4 12:20:20 2017
New Revision: 294096
URL: http://llvm.org/viewvc/llvm-project?rev=294096&view=rev
Log:
TripleTest.BitWidthArchVariants: add missing arch types (thumb, arm, le, ...)
Modified:
llvm/trunk/unittests/ADT/TripleTest.cpp
Modified: llvm/trunk/unittests/ADT/TripleTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/TripleTest.cpp?rev=294096&r1=294095&r2=294096&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/TripleTest.cpp (original)
+++ llvm/trunk/unittests/ADT/TripleTest.cpp Sat Feb 4 12:20:20 2017
@@ -685,6 +685,54 @@ TEST(TripleTest, BitWidthArchVariants) {
T.setArch(Triple::riscv64);
EXPECT_EQ(Triple::riscv32, T.get32BitArchVariant().getArch());
EXPECT_EQ(Triple::riscv64, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::thumbeb);
+ EXPECT_EQ(Triple::thumbeb, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::aarch64_be, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::thumb);
+ EXPECT_EQ(Triple::thumb, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::aarch64, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::aarch64);
+ EXPECT_EQ(Triple::arm, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::aarch64, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::aarch64_be);
+ EXPECT_EQ(Triple::armeb, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::aarch64_be, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::renderscript32);
+ EXPECT_EQ(Triple::renderscript32, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::renderscript64, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::renderscript64);
+ EXPECT_EQ(Triple::renderscript32, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::renderscript64, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::le32);
+ EXPECT_EQ(Triple::le32, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::le64, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::le64);
+ EXPECT_EQ(Triple::le32, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::le64, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::armeb);
+ EXPECT_EQ(Triple::armeb, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::aarch64_be, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::arm);
+ EXPECT_EQ(Triple::arm, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::aarch64, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::systemz);
+ EXPECT_EQ(Triple::UnknownArch, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::systemz, T.get64BitArchVariant().getArch());
+
+ T.setArch(Triple::xcore);
+ EXPECT_EQ(Triple::xcore, T.get32BitArchVariant().getArch());
+ EXPECT_EQ(Triple::UnknownArch, T.get64BitArchVariant().getArch());
}
TEST(TripleTest, EndianArchVariants) {
More information about the llvm-commits
mailing list