aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2021-10-06 12:14:55 +0100
committerJay Foad <jay.foad@amd.com>2022-06-07 10:01:49 +0100
commit1feed6691a2755609cc954a05d0405e8080118c4 (patch)
treebe6022b3ef4446ad71ac4d968ed49c6053209696 /llvm/lib/Support/APInt.cpp
parent28eeea1e2787a8491b9c636cdf31fc81e3aca1fb (diff)
downloadllvm-1feed6691a2755609cc954a05d0405e8080118c4.zip
llvm-1feed6691a2755609cc954a05d0405e8080118c4.tar.gz
llvm-1feed6691a2755609cc954a05d0405e8080118c4.tar.bz2
[APInt] Remove truncOrSelf, zextOrSelf and sextOrSelf
Differential Revision: https://reviews.llvm.org/D125559
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r--llvm/lib/Support/APInt.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index ca8e8a5..acc68fe 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -1007,24 +1007,6 @@ APInt APInt::sextOrTrunc(unsigned width) const {
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) {