[llvm] [ADT] Drop "const" from "const APInt" (NFC) (PR #138825)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed May 7 01:41:35 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/138825

None

>From 12cd4551fae067c9a784c687d042ac0424213305 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 7 May 2025 01:25:30 -0700
Subject: [PATCH] [ADT] Drop "const" from "const APInt" (NFC)

---
 llvm/include/llvm/ADT/APInt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h
index 02d58d8c3d31c..ba33c49fb5191 100644
--- a/llvm/include/llvm/ADT/APInt.h
+++ b/llvm/include/llvm/ADT/APInt.h
@@ -2234,12 +2234,12 @@ inline const APInt &umax(const APInt &A, const APInt &B) {
 }
 
 /// Determine the absolute difference of two APInts considered to be signed.
-inline const APInt abds(const APInt &A, const APInt &B) {
+inline APInt abds(const APInt &A, const APInt &B) {
   return A.sge(B) ? (A - B) : (B - A);
 }
 
 /// Determine the absolute difference of two APInts considered to be unsigned.
-inline const APInt abdu(const APInt &A, const APInt &B) {
+inline APInt abdu(const APInt &A, const APInt &B) {
   return A.uge(B) ? (A - B) : (B - A);
 }
 



More information about the llvm-commits mailing list