We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd16029 commit cdcf4bdCopy full SHA for cdcf4bd
llvm/include/llvm/CodeGen/TargetRegisterInfo.h
@@ -55,6 +55,17 @@ class TargetSuperClassIterator
55
56
using iterator_adaptor_base::operator++;
57
58
+ bool operator==(const TargetSuperClassIterator &Other) const {
59
+ // End can be represented either with a nullptr or with a ptr to
60
+ // a sentinel value of ~0U. They must compare equal.
61
+ bool SelfIsEnd = !I || *I == ~0U;
62
+ bool OtherIsEnd = !Other.I || *Other.I == ~0U;
63
+ if (SelfIsEnd && OtherIsEnd)
64
+ return true;
65
+
66
+ return I == Other.I;
67
+ }
68
69
/// Returns true if this iterator is not yet at the end.
70
bool isValid() const { return I && *I != ~0U; }
71
};
0 commit comments