[llvm] 857fa70 - [Support] Remove {Bits, Float, Double}To{Bits, Float, Double}

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 13:18:21 PDT 2023


Author: Kazu Hirata
Date: 2023-06-05T13:18:05-07:00
New Revision: 857fa70e1458b2d44f2444f87a909117d449c2ba

URL: https://github.com/llvm/llvm-project/commit/857fa70e1458b2d44f2444f87a909117d449c2ba
DIFF: https://github.com/llvm/llvm-project/commit/857fa70e1458b2d44f2444f87a909117d449c2ba.diff

LOG: [Support] Remove {Bits,Float,Double}To{Bits,Float,Double}

These functions have been deprecated since:

  commit 0f52c1f86c62dadf69a7b732779abf59edea3d5c
  Author: Kazu Hirata <kazu at google.com>
  Date:   Tue Feb 14 09:52:36 2023 -0800

Differential Revision: https://reviews.llvm.org/D152110

Added: 
    

Modified: 
    llvm/include/llvm/Support/MathExtras.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
index cc5a860a4be4f..72fe36777d601 100644
--- a/llvm/include/llvm/Support/MathExtras.h
+++ b/llvm/include/llvm/Support/MathExtras.h
@@ -402,38 +402,6 @@ inline unsigned Log2_64_Ceil(uint64_t Value) {
   return 64 - llvm::countl_zero(Value - 1);
 }
 
-/// This function takes a 64-bit integer and returns the bit equivalent double.
-LLVM_DEPRECATED("use llvm::bit_cast instead", "llvm::bit_cast<double>")
-inline double BitsToDouble(uint64_t Bits) {
-  static_assert(sizeof(uint64_t) == sizeof(double), "Unexpected type sizes");
-  return llvm::bit_cast<double>(Bits);
-}
-
-/// This function takes a 32-bit integer and returns the bit equivalent float.
-LLVM_DEPRECATED("use llvm::bit_cast instead", "llvm::bit_cast<float>")
-inline float BitsToFloat(uint32_t Bits) {
-  static_assert(sizeof(uint32_t) == sizeof(float), "Unexpected type sizes");
-  return llvm::bit_cast<float>(Bits);
-}
-
-/// This function takes a double and returns the bit equivalent 64-bit integer.
-/// Note that copying doubles around changes the bits of NaNs on some hosts,
-/// notably x86, so this routine cannot be used if these bits are needed.
-LLVM_DEPRECATED("use llvm::bit_cast instead", "llvm::bit_cast<uint64_t>")
-inline uint64_t DoubleToBits(double Double) {
-  static_assert(sizeof(uint64_t) == sizeof(double), "Unexpected type sizes");
-  return llvm::bit_cast<uint64_t>(Double);
-}
-
-/// This function takes a float and returns the bit equivalent 32-bit integer.
-/// Note that copying floats around changes the bits of NaNs on some hosts,
-/// notably x86, so this routine cannot be used if these bits are needed.
-LLVM_DEPRECATED("use llvm::bit_cast instead", "llvm::bit_cast<uint32_t>")
-inline uint32_t FloatToBits(float Float) {
-  static_assert(sizeof(uint32_t) == sizeof(float), "Unexpected type sizes");
-  return llvm::bit_cast<uint32_t>(Float);
-}
-
 /// A and B are either alignments or offsets. Return the minimum alignment that
 /// may be assumed after adding the two together.
 constexpr inline uint64_t MinAlign(uint64_t A, uint64_t B) {


        


More information about the llvm-commits mailing list