forked from OSchip/llvm-project
TripleTest.BitWidthArchVariants: add missing arch types (thumb, arm, le, ...)
llvm-svn: 294096
This commit is contained in:
parent
41601500cf
commit
d29bcbbb3b
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue