[PATCH] D125558: [APInt] Deprecate truncOrSelf, zextOrSelf and sextOrSelf
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 03:33:37 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4e432f1b7ce6: [APInt] Deprecate truncOrSelf, zextOrSelf and sextOrSelf (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125558/new/
https://reviews.llvm.org/D125558
Files:
llvm/include/llvm/ADT/APInt.h
llvm/unittests/ADT/APIntTest.cpp
Index: llvm/unittests/ADT/APIntTest.cpp
===================================================================
--- llvm/unittests/ADT/APIntTest.cpp
+++ llvm/unittests/ADT/APIntTest.cpp
@@ -2663,9 +2663,6 @@
APInt val(32, 0xFFFFFFFF);
EXPECT_EQ(0xFFFF, val.trunc(16));
EXPECT_EQ(0xFFFFFFFF, val.trunc(32));
- EXPECT_EQ(0xFFFF, val.truncOrSelf(16));
- EXPECT_EQ(0xFFFFFFFF, val.truncOrSelf(32));
- EXPECT_EQ(0xFFFFFFFF, val.truncOrSelf(64));
}
TEST(APIntTest, concat) {
Index: llvm/include/llvm/ADT/APInt.h
===================================================================
--- llvm/include/llvm/ADT/APInt.h
+++ llvm/include/llvm/ADT/APInt.h
@@ -1263,15 +1263,15 @@
/// Truncate this APInt if necessary to ensure that its bit width is <= \p
/// width.
- APInt truncOrSelf(unsigned width) const;
+ [[deprecated("Use trunc instead")]] APInt truncOrSelf(unsigned width) const;
/// Sign-extend this APInt if necessary to ensure that its bit width is >= \p
/// width.
- APInt sextOrSelf(unsigned width) const;
+ [[deprecated("Use sext instead")]] APInt sextOrSelf(unsigned width) const;
/// Zero-extend this APInt if necessary to ensure that its bit width is >= \p
/// width.
- APInt zextOrSelf(unsigned width) const;
+ [[deprecated("Use zext instead")]] APInt zextOrSelf(unsigned width) const;
/// @}
/// \name Bit Manipulation Operators
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125558.430629.patch
Type: text/x-patch
Size: 1384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220519/254baab9/attachment.bin>
More information about the llvm-commits
mailing list