mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 12:08:25 +00:00
add missing methods, mark stuff const
llvm-svn: 35862
This commit is contained in:
parent
da0e61ca4c
commit
f661523670
@ -68,13 +68,21 @@ public:
|
||||
*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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user