Changes in directory llvm/include/llvm/ADT:
APInt.h updated: 1.31 -> 1.32 --- Log message: Add methods for bit width modification: sextOrTrunc, zextOrTrunc. --- Diffs of the changes: (+10 -0) APInt.h | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/include/llvm/ADT/APInt.h:1.31 llvm/include/llvm/ADT/APInt.h:1.32 --- llvm/include/llvm/ADT/APInt.h:1.31 Wed Feb 28 23:39:56 2007 +++ llvm/include/llvm/ADT/APInt.h Thu Mar 1 11:15:32 2007 @@ -423,6 +423,16 @@ /// @brief Zero extend to a new width. APInt &zext(uint32_t width); + /// Make this APInt have the bit width given by \p width. The value is sign + /// extended, truncated, or left alone to make it that width. + /// @brief Sign extend or truncate to width + APInt &sextOrTrunc(uint32_t width); + + /// Make this APInt have the bit width given by \p width. The value is zero + /// extended, truncated, or left alone to make it that width. + /// @brief Zero extend or truncate to width + APInt &zextOrTrunc(uint32_t width); + /// @brief Set every bit to 1. APInt& set(); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits