mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Fix possible compilation issue with gcc-11
This commit is contained in:
parent
548daf04b5
commit
2e65b3a418
@ -724,21 +724,21 @@ namespace llvm {
|
||||
T *P;
|
||||
|
||||
public:
|
||||
SingleLinkedListIterator<T>(T *P) : P(P) {}
|
||||
SingleLinkedListIterator(T *P) : P(P) {}
|
||||
|
||||
SingleLinkedListIterator<T> &operator++() {
|
||||
SingleLinkedListIterator &operator++() {
|
||||
P = P->Next;
|
||||
return *this;
|
||||
}
|
||||
SingleLinkedListIterator<T> operator++(int) {
|
||||
SingleLinkedListIterator operator++(int) {
|
||||
SingleLinkedListIterator res = *this;
|
||||
++*this;
|
||||
return res;
|
||||
}
|
||||
bool operator!=(const SingleLinkedListIterator<T> &Other) const {
|
||||
bool operator!=(const SingleLinkedListIterator &Other) const {
|
||||
return P != Other.operator->();
|
||||
}
|
||||
bool operator==(const SingleLinkedListIterator<T> &Other) const {
|
||||
bool operator==(const SingleLinkedListIterator &Other) const {
|
||||
return P == Other.operator->();
|
||||
}
|
||||
T &operator*() const {
|
||||
|
@ -270,11 +270,11 @@ public:
|
||||
assert(Stream.getLength() % sizeof(T) == 0);
|
||||
}
|
||||
|
||||
bool operator==(const FixedStreamArray<T> &Other) const {
|
||||
bool operator==(const FixedStreamArray &Other) const {
|
||||
return Stream == Other.Stream;
|
||||
}
|
||||
|
||||
bool operator!=(const FixedStreamArray<T> &Other) const {
|
||||
bool operator!=(const FixedStreamArray &Other) const {
|
||||
return !(*this == Other);
|
||||
}
|
||||
|
||||
@ -328,10 +328,10 @@ public:
|
||||
FixedStreamArrayIterator(const FixedStreamArray<T> &Array, uint32_t Index)
|
||||
: Array(Array), Index(Index) {}
|
||||
|
||||
FixedStreamArrayIterator<T>(const FixedStreamArrayIterator<T> &Other)
|
||||
FixedStreamArrayIterator(const FixedStreamArrayIterator &Other)
|
||||
: Array(Other.Array), Index(Other.Index) {}
|
||||
FixedStreamArrayIterator<T> &
|
||||
operator=(const FixedStreamArrayIterator<T> &Other) {
|
||||
FixedStreamArrayIterator&
|
||||
operator=(const FixedStreamArrayIterator &Other) {
|
||||
Array = Other.Array;
|
||||
Index = Other.Index;
|
||||
return *this;
|
||||
@ -340,29 +340,29 @@ public:
|
||||
const T &operator*() const { return Array[Index]; }
|
||||
const T &operator*() { return Array[Index]; }
|
||||
|
||||
bool operator==(const FixedStreamArrayIterator<T> &R) const {
|
||||
bool operator==(const FixedStreamArrayIterator &R) const {
|
||||
assert(Array == R.Array);
|
||||
return (Index == R.Index) && (Array == R.Array);
|
||||
}
|
||||
|
||||
FixedStreamArrayIterator<T> &operator+=(std::ptrdiff_t N) {
|
||||
FixedStreamArrayIterator &operator+=(std::ptrdiff_t N) {
|
||||
Index += N;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FixedStreamArrayIterator<T> &operator-=(std::ptrdiff_t N) {
|
||||
FixedStreamArrayIterator &operator-=(std::ptrdiff_t N) {
|
||||
assert(std::ptrdiff_t(Index) >= N);
|
||||
Index -= N;
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::ptrdiff_t operator-(const FixedStreamArrayIterator<T> &R) const {
|
||||
std::ptrdiff_t operator-(const FixedStreamArrayIterator &R) const {
|
||||
assert(Array == R.Array);
|
||||
assert(Index >= R.Index);
|
||||
return Index - R.Index;
|
||||
}
|
||||
|
||||
bool operator<(const FixedStreamArrayIterator<T> &RHS) const {
|
||||
bool operator<(const FixedStreamArrayIterator &RHS) const {
|
||||
assert(Array == RHS.Array);
|
||||
return Index < RHS.Index;
|
||||
}
|
||||
|
@ -626,7 +626,7 @@ private:
|
||||
unsigned getRegIdx(Register Reg) const {
|
||||
for (unsigned Idx = 0; Idx < Locs.size(); ++Idx)
|
||||
if (Locs[Idx].Kind == MachineLocKind::RegisterKind &&
|
||||
Locs[Idx].Value.RegNo == Reg)
|
||||
llvm::Register(Locs[Idx].Value.RegNo) == Reg)
|
||||
return Idx;
|
||||
llvm_unreachable("Could not find given Reg in Locs");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user