projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5be17b6
)
Add operator== for DefinedAtom::reference_iterator. NFC.
author
Pete Cooper
<peter_cooper@apple.com>
Mon, 1 Feb 2016 23:05:20 +0000
(23:05 +0000)
committer
Pete Cooper
<peter_cooper@apple.com>
Mon, 1 Feb 2016 23:05:20 +0000
(23:05 +0000)
This will be used by a future commit which wanted to compare iterators
for equality.
Also changed operator!= to be in terms of the new operator==
llvm-svn: 259431
lld/include/lld/Core/DefinedAtom.h
patch
|
blob
|
history
diff --git
a/lld/include/lld/Core/DefinedAtom.h
b/lld/include/lld/Core/DefinedAtom.h
index
47891b9
..
f0cf608
100644
(file)
--- a/
lld/include/lld/Core/DefinedAtom.h
+++ b/
lld/include/lld/Core/DefinedAtom.h
@@
-308,8
+308,12
@@
public:
return _atom.derefIterator(_it);
}
+ bool operator==(const reference_iterator &other) const {
+ return _it == other._it;
+ }
+
bool operator!=(const reference_iterator &other) const {
- return
_it != other._it
;
+ return
!(*this == other)
;
}
reference_iterator &operator++() {