diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h --- a/llvm/include/llvm/ADT/APInt.h +++ b/llvm/include/llvm/ADT/APInt.h @@ -1261,18 +1261,6 @@ /// extended, truncated, or left alone to make it that width. APInt zextOrTrunc(unsigned width) const; - /// Truncate this APInt if necessary to ensure that its bit width is <= \p - /// width. - [[deprecated("Use trunc instead")]] APInt truncOrSelf(unsigned width) const; - - /// Sign-extend this APInt if necessary to ensure that its bit width is >= \p - /// width. - [[deprecated("Use sext instead")]] APInt sextOrSelf(unsigned width) const; - - /// Zero-extend this APInt if necessary to ensure that its bit width is >= \p - /// width. - [[deprecated("Use zext instead")]] APInt zextOrSelf(unsigned width) const; - /// @} /// \name Bit Manipulation Operators /// @{ diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -1007,24 +1007,6 @@ return *this; } -APInt APInt::truncOrSelf(unsigned width) const { - if (BitWidth > width) - return trunc(width); - return *this; -} - -APInt APInt::zextOrSelf(unsigned width) const { - if (BitWidth < width) - return zext(width); - return *this; -} - -APInt APInt::sextOrSelf(unsigned width) const { - if (BitWidth < width) - return sext(width); - return *this; -} - /// Arithmetic right-shift this APInt by shiftAmt. /// Arithmetic right-shift function. void APInt::ashrInPlace(const APInt &shiftAmt) {