[clang] [llvm] [LLVM] [Clang] Support for Gentoo `*t64` triples (64-bit time_t ABIs) (PR #111302)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 6 10:26:08 PDT 2024


=?utf-8?q?Micha=C5=82_G=C3=B3rny?= <mgorny at gentoo.org>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/111302 at github.com>


================
@@ -1283,6 +1283,28 @@ TEST(TripleTest, ParsedIDs) {
   EXPECT_EQ(Triple::Linux, T.getOS());
   EXPECT_EQ(Triple::PAuthTest, T.getEnvironment());
 
+  // Gentoo time64 triples
+  T = Triple("i686-pc-linux-gnut64");
+  EXPECT_EQ(Triple::x86, T.getArch());
+  EXPECT_EQ(Triple::PC, T.getVendor());
+  EXPECT_EQ(Triple::Linux, T.getOS());
+  EXPECT_EQ(Triple::GNUT64, T.getEnvironment());
+  EXPECT_TRUE(T.isTime64ABI());
+
+  T = Triple("armv5tel-softfloat-linux-gnueabit64");
+  EXPECT_EQ(Triple::arm, T.getArch());
+  EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+  EXPECT_EQ(Triple::Linux, T.getOS());
+  EXPECT_EQ(Triple::GNUEABIT64, T.getEnvironment());
+  EXPECT_TRUE(T.isTime64ABI());
+
+  T = Triple("armv7a-unknown-linux-gnueabihft64");
+  EXPECT_EQ(Triple::arm, T.getArch());
+  EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+  EXPECT_EQ(Triple::Linux, T.getOS());
+  EXPECT_EQ(Triple::GNUEABIHFT64, T.getEnvironment());
+  EXPECT_TRUE(T.isTime64ABI());
----------------
MaskRay wrote:

needs a negative test for `isTime64ABI`

https://github.com/llvm/llvm-project/pull/111302


More information about the cfe-commits mailing list