Changes in directory llvm/include/llvm/ADT:
APSInt.h updated: 1.1 -> 1.2 --- Log message: add missing methods, mark stuff const --- Diffs of the changes: (+9 -1) APSInt.h | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletion(-) Index: llvm/include/llvm/ADT/APSInt.h diff -u llvm/include/llvm/ADT/APSInt.h:1.1 llvm/include/llvm/ADT/APSInt.h:1.2 --- llvm/include/llvm/ADT/APSInt.h:1.1 Thu Apr 5 00:20:11 2007 +++ llvm/include/llvm/ADT/APSInt.h Tue Apr 10 02:06:21 2007 @@ -68,13 +68,21 @@ *this = sdiv(RHS); return *this; } + APSInt operator%(const APSInt &RHS) const { + assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); + return IsUnsigned ? urem(RHS) : srem(RHS); + } + APSInt operator/(const APSInt &RHS) const { + assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); + return IsUnsigned ? udiv(RHS) : sdiv(RHS); + } const APSInt &operator>>=(unsigned Amt) { *this = *this >> Amt; return *this; } - APSInt operator>>(unsigned Amt) { + APSInt operator>>(unsigned Amt) const { return IsUnsigned ? lshr(Amt) : ashr(Amt); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits