[llvm] [Support] Remove deprecated CTLog2 from MathExtras.h (PR #218274)

Marc Auberer via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 23 11:43:09 PDT 2026


https://github.com/marcauberer created https://github.com/llvm/llvm-project/pull/218274

CTLog2 was deprecated in favor of ConstantLog2 and has no remaining in-tree users, so drop it.

>From 95316fc8ee279614a2eb9caf0d396e9b9b092e5a Mon Sep 17 00:00:00 2001
From: Claude <noreply at anthropic.com>
Date: Sun, 23 Aug 2026 18:40:02 +0000
Subject: [PATCH] [Support] Remove deprecated CTLog2 from MathExtras.h

CTLog2 was deprecated in favor of ConstantLog2 and has no remaining
in-tree users, so drop it.

Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
Claude-Session: https://claude.ai/code/session_01Km7h9KD2qCHf4vM3WVaCK3
---
 llvm/include/llvm/Support/MathExtras.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
index d429f63520616..2324565852815 100644
--- a/llvm/include/llvm/Support/MathExtras.h
+++ b/llvm/include/llvm/Support/MathExtras.h
@@ -320,12 +320,6 @@ template <size_t kValue> constexpr size_t ConstantLog2() {
   return llvm::countr_zero_constexpr(kValue);
 }
 
-template <size_t kValue>
-LLVM_DEPRECATED("Use ConstantLog2 instead", "ConstantLog2")
-constexpr size_t CTLog2() {
-  return ConstantLog2<kValue>();
-}
-
 /// Return the floor log base 2 of the specified value, -1 if the value is zero.
 /// (32 bit edition.)
 /// Ex. Log2_32(32) == 5, Log2_32(1) == 0, Log2_32(0) == -1, Log2_32(6) == 2



More information about the llvm-commits mailing list