[llvm] r360763 - arm64_32: add some unittests that were in the wrong commit.
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 05:01:04 PDT 2019
Author: tnorthover
Date: Wed May 15 05:01:04 2019
New Revision: 360763
URL: http://llvm.org/viewvc/llvm-project?rev=360763&view=rev
Log:
arm64_32: add some unittests that were in the wrong commit.
Accidentally dropped them when committing the arm64_32 binutils support.
There's no change to real code.
Modified:
llvm/trunk/unittests/ADT/TripleTest.cpp
llvm/trunk/unittests/Support/TargetParserTest.cpp
Modified: llvm/trunk/unittests/ADT/TripleTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/TripleTest.cpp?rev=360763&r1=360762&r2=360763&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/TripleTest.cpp (original)
+++ llvm/trunk/unittests/ADT/TripleTest.cpp Wed May 15 05:01:04 2019
@@ -552,6 +552,13 @@ TEST(TripleTest, ParsedIDs) {
EXPECT_EQ(Triple::OpenEmbedded, T.getVendor());
EXPECT_EQ(Triple::Linux, T.getOS());
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
+ EXPECT_TRUE(T.isArch64Bit());
+
+ T = Triple("arm64_32-apple-ios");
+ EXPECT_EQ(Triple::aarch64_32, T.getArch());
+ EXPECT_EQ(Triple::IOS, T.getOS());
+ EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
+ EXPECT_TRUE(T.isArch32Bit());
T = Triple("huh");
EXPECT_EQ(Triple::UnknownArch, T.getArch());
@@ -1458,6 +1465,10 @@ TEST(TripleTest, ParseARMArch) {
EXPECT_EQ(Triple::aarch64, T.getArch());
}
{
+ Triple T = Triple("arm64_32");
+ EXPECT_EQ(Triple::aarch64_32, T.getArch());
+ }
+ {
Triple T = Triple("aarch64");
EXPECT_EQ(Triple::aarch64, T.getArch());
}
Modified: llvm/trunk/unittests/Support/TargetParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TargetParserTest.cpp?rev=360763&r1=360762&r2=360763&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/TargetParserTest.cpp (original)
+++ llvm/trunk/unittests/Support/TargetParserTest.cpp Wed May 15 05:01:04 2019
@@ -658,12 +658,15 @@ TEST(TargetParserTest, ARMparseArchEndia
}
EXPECT_EQ(ARM::EndianKind::LITTLE, ARM::parseArchEndian("aarch64"));
+ EXPECT_EQ(ARM::EndianKind::LITTLE, ARM::parseArchEndian("arm64_32"));
EXPECT_EQ(ARM::EndianKind::BIG, ARM::parseArchEndian("aarch64_be"));
EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("aarch64"));
EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("aarch64_be"));
EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("arm64"));
EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("arm64_be"));
+ EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("arm64_32"));
+ EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("aarch64_32"));
}
TEST(TargetParserTest, ARMparseArchProfile) {
More information about the llvm-commits
mailing list