aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/MathExtrasTest.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2020-02-27 17:06:48 -0800
committerReid Kleckner <rnk@google.com>2020-02-27 17:23:48 -0800
commite3a9b0f35955ab0fdcba3da713bb2f4cd0b29680 (patch)
tree35902049b194830fd4580215a1a89197b5ad5bdb /llvm/unittests/Support/MathExtrasTest.cpp
parent470db54cbdf1ce65e7084aa42a8c5e9f1c41a9bd (diff)
downloadllvm-e3a9b0f35955ab0fdcba3da713bb2f4cd0b29680.zip
llvm-e3a9b0f35955ab0fdcba3da713bb2f4cd0b29680.tar.gz
llvm-e3a9b0f35955ab0fdcba3da713bb2f4cd0b29680.tar.bz2
[Support] Remove byte swapping from MathExtras.h
MathExtras.h was just wrapping SwapByteOrder.h functionality, so have the callers use it directly. Use the MathExtras.h name (ByteSwap_NN) as the standard naming, since it appears to be the most popular.
Diffstat (limited to 'llvm/unittests/Support/MathExtrasTest.cpp')
-rw-r--r--llvm/unittests/Support/MathExtrasTest.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/unittests/Support/MathExtrasTest.cpp b/llvm/unittests/Support/MathExtrasTest.cpp
index e910d83..d899af9 100644
--- a/llvm/unittests/Support/MathExtrasTest.cpp
+++ b/llvm/unittests/Support/MathExtrasTest.cpp
@@ -222,16 +222,6 @@ TEST(MathExtras, CTLog2) {
EXPECT_EQ(CTLog2<1ULL << 15>(), 15U);
}
-TEST(MathExtras, ByteSwap_32) {
- EXPECT_EQ(0x44332211u, ByteSwap_32(0x11223344));
- EXPECT_EQ(0xDDCCBBAAu, ByteSwap_32(0xAABBCCDD));
-}
-
-TEST(MathExtras, ByteSwap_64) {
- EXPECT_EQ(0x8877665544332211ULL, ByteSwap_64(0x1122334455667788LL));
- EXPECT_EQ(0x1100FFEEDDCCBBAAULL, ByteSwap_64(0xAABBCCDDEEFF0011LL));
-}
-
TEST(MathExtras, countLeadingOnes) {
for (int i = 30; i >= 0; --i) {
// Start with all ones and unset some bit.