llvm.org GIT mirror llvm / 403949e
add missing methods, mark stuff const git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35862 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 9 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
6767 *this = sdiv(RHS);
6868 return *this;
6969 }
70 APSInt operator%(const APSInt &RHS) const {
71 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
72 return IsUnsigned ? urem(RHS) : srem(RHS);
73 }
74 APSInt operator/(const APSInt &RHS) const {
75 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
76 return IsUnsigned ? udiv(RHS) : sdiv(RHS);
77 }
7078
7179 const APSInt &operator>>=(unsigned Amt) {
7280 *this = *this >> Amt;
7381 return *this;
7482 }
7583
76 APSInt operator>>(unsigned Amt) {
84 APSInt operator>>(unsigned Amt) const {
7785 return IsUnsigned ? lshr(Amt) : ashr(Amt);
7886 }
7987