[llvm] 43cd59d - [TableGen] Remove unused getMinimalTypeForEnumBitfield

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 20:32:50 PDT 2023


Author: Kazu Hirata
Date: 2023-05-17T20:32:37-07:00
New Revision: 43cd59d5df2300ecc650536940a9bea2ece2c3d6

URL: https://github.com/llvm/llvm-project/commit/43cd59d5df2300ecc650536940a9bea2ece2c3d6
DIFF: https://github.com/llvm/llvm-project/commit/43cd59d5df2300ecc650536940a9bea2ece2c3d6.diff

LOG: [TableGen] Remove unused getMinimalTypeForEnumBitfield

The last use was removed by:

  commit e98944ed47acd04279184343017aa2bf34999111
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   Mon Mar 11 17:04:35 2019 +0000

Added: 
    

Modified: 
    llvm/utils/TableGen/Types.cpp
    llvm/utils/TableGen/Types.h

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/Types.cpp b/llvm/utils/TableGen/Types.cpp
index a6682da90e6b..aca8e36b683d 100644
--- a/llvm/utils/TableGen/Types.cpp
+++ b/llvm/utils/TableGen/Types.cpp
@@ -34,11 +34,3 @@ const char *llvm::getMinimalTypeForRange(uint64_t Range, unsigned MaxSize LLVM_A
     return "uint16_t";
   return "uint8_t";
 }
-
-const char *llvm::getMinimalTypeForEnumBitfield(uint64_t Size) {
-  uint64_t MaxIndex = Size;
-  if (MaxIndex > 0)
-    MaxIndex--;
-  assert(MaxIndex <= 64 && "Too many bits");
-  return getMinimalTypeForRange(1ULL << MaxIndex);
-}

diff  --git a/llvm/utils/TableGen/Types.h b/llvm/utils/TableGen/Types.h
index 17c7742ccaac..f369d61785c4 100644
--- a/llvm/utils/TableGen/Types.h
+++ b/llvm/utils/TableGen/Types.h
@@ -16,9 +16,6 @@ namespace llvm {
 /// MaxSize indicates the largest size of integer to consider (in bits) and only
 /// supports values of at least 32.
 const char *getMinimalTypeForRange(uint64_t Range, unsigned MaxSize = 64);
-
-/// Returns the smallest unsigned integer type that can hold the given bitfield.
-const char *getMinimalTypeForEnumBitfield(uint64_t Size);
 }
 
 #endif


        


More information about the llvm-commits mailing list