diff options
author | Kazu Hirata <kazu@google.com> | 2025-09-11 07:54:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-11 07:54:27 -0700 |
commit | ae789571124bbd4205d2339de306b9b455bb0038 (patch) | |
tree | 7733978ae156b2e54ca5becb60c05a7a5ebe19ba /llvm/unittests/Support/MathExtrasTest.cpp | |
parent | 808f5d13b32c4280d186880a676f6be6b02b8fda (diff) | |
download | llvm-ae789571124bbd4205d2339de306b9b455bb0038.zip llvm-ae789571124bbd4205d2339de306b9b455bb0038.tar.gz llvm-ae789571124bbd4205d2339de306b9b455bb0038.tar.bz2 |
[Support] Rename CTLog2 to ConstantLog2 in MathExtras.h (#158006)
This patch renames CTLog2 to ConstantLog2 for readability.
This patch provides a forwarder under LLVM_DEPRECATED because CTLog2
is used downstream.
Diffstat (limited to 'llvm/unittests/Support/MathExtrasTest.cpp')
-rw-r--r-- | llvm/unittests/Support/MathExtrasTest.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/llvm/unittests/Support/MathExtrasTest.cpp b/llvm/unittests/Support/MathExtrasTest.cpp index 984185f..5cb85fc 100644 --- a/llvm/unittests/Support/MathExtrasTest.cpp +++ b/llvm/unittests/Support/MathExtrasTest.cpp @@ -152,23 +152,23 @@ TEST(MathExtras, PowerOf2Ceil) { EXPECT_EQ(8U, PowerOf2Ceil(7U)); } -TEST(MathExtras, CTLog2) { - EXPECT_EQ(CTLog2<1ULL << 0>(), 0U); - EXPECT_EQ(CTLog2<1ULL << 1>(), 1U); - EXPECT_EQ(CTLog2<1ULL << 2>(), 2U); - EXPECT_EQ(CTLog2<1ULL << 3>(), 3U); - EXPECT_EQ(CTLog2<1ULL << 4>(), 4U); - EXPECT_EQ(CTLog2<1ULL << 5>(), 5U); - EXPECT_EQ(CTLog2<1ULL << 6>(), 6U); - EXPECT_EQ(CTLog2<1ULL << 7>(), 7U); - EXPECT_EQ(CTLog2<1ULL << 8>(), 8U); - EXPECT_EQ(CTLog2<1ULL << 9>(), 9U); - EXPECT_EQ(CTLog2<1ULL << 10>(), 10U); - EXPECT_EQ(CTLog2<1ULL << 11>(), 11U); - EXPECT_EQ(CTLog2<1ULL << 12>(), 12U); - EXPECT_EQ(CTLog2<1ULL << 13>(), 13U); - EXPECT_EQ(CTLog2<1ULL << 14>(), 14U); - EXPECT_EQ(CTLog2<1ULL << 15>(), 15U); +TEST(MathExtras, ConstantLog2) { + EXPECT_EQ(ConstantLog2<1ULL << 0>(), 0U); + EXPECT_EQ(ConstantLog2<1ULL << 1>(), 1U); + EXPECT_EQ(ConstantLog2<1ULL << 2>(), 2U); + EXPECT_EQ(ConstantLog2<1ULL << 3>(), 3U); + EXPECT_EQ(ConstantLog2<1ULL << 4>(), 4U); + EXPECT_EQ(ConstantLog2<1ULL << 5>(), 5U); + EXPECT_EQ(ConstantLog2<1ULL << 6>(), 6U); + EXPECT_EQ(ConstantLog2<1ULL << 7>(), 7U); + EXPECT_EQ(ConstantLog2<1ULL << 8>(), 8U); + EXPECT_EQ(ConstantLog2<1ULL << 9>(), 9U); + EXPECT_EQ(ConstantLog2<1ULL << 10>(), 10U); + EXPECT_EQ(ConstantLog2<1ULL << 11>(), 11U); + EXPECT_EQ(ConstantLog2<1ULL << 12>(), 12U); + EXPECT_EQ(ConstantLog2<1ULL << 13>(), 13U); + EXPECT_EQ(ConstantLog2<1ULL << 14>(), 14U); + EXPECT_EQ(ConstantLog2<1ULL << 15>(), 15U); } TEST(MathExtras, MinAlign) { |