[llvm] [ADT] Remove Mask in PointerEmbedded (PR #156201)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 30 12:39:22 PDT 2025


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

Mask, a private enum, isn't used anywhere in the class.


>From 78495ab04543a1e391e0642cfc2d03e7b7a69fff Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 28 Aug 2025 22:14:46 -0700
Subject: [PATCH] [ADT] Remove Mask in PointerEmbedded

Mask, a private enum, isn't used anywhere in the class.
---
 llvm/include/llvm/ADT/PointerEmbeddedInt.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/llvm/include/llvm/ADT/PointerEmbeddedInt.h b/llvm/include/llvm/ADT/PointerEmbeddedInt.h
index fbc48af79da1e..04a2b7bff78e0 100644
--- a/llvm/include/llvm/ADT/PointerEmbeddedInt.h
+++ b/llvm/include/llvm/ADT/PointerEmbeddedInt.h
@@ -42,9 +42,6 @@ class PointerEmbeddedInt {
     // We shift as many zeros into the value as we can while preserving the
     // number of bits desired for the integer.
     Shift = sizeof(uintptr_t) * CHAR_BIT - Bits,
-
-    // We also want to be able to mask out the preserved bits for asserts.
-    Mask = static_cast<uintptr_t>(-1) << Bits
   };
 
   struct RawValueTag {



More information about the llvm-commits mailing list