mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
add missing methods, mark stuff const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35862 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
99b1b38818
commit
403949ea93
@ -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