summaryrefslogtreecommitdiff
path: root/include/llvm/Support/YAMLParser.h
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2012-04-17 16:38:41 +0000
committerManuel Klimek <klimek@google.com>2012-04-17 16:38:41 +0000
commit388774c02a249a2846d7b470cdd8981e44edaf1d (patch)
tree8cd5bce045b403b607660e388cbac6655ebe5710 /include/llvm/Support/YAMLParser.h
parent93751c8c99a0fbfedd464c7179128381c1192116 (diff)
downloadllvm-388774c02a249a2846d7b470cdd8981e44edaf1d.tar.gz
llvm-388774c02a249a2846d7b470cdd8981e44edaf1d.tar.bz2
llvm-388774c02a249a2846d7b470cdd8981e44edaf1d.tar.xz
Adding operator== for document_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/YAMLParser.h')
-rw-r--r--include/llvm/Support/YAMLParser.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Support/YAMLParser.h b/include/llvm/Support/YAMLParser.h
index b24cacd3c3..47206b3c6d 100644
--- a/include/llvm/Support/YAMLParser.h
+++ b/include/llvm/Support/YAMLParser.h
@@ -516,8 +516,11 @@ public:
document_iterator() : Doc(NullDoc) {}
document_iterator(OwningPtr<Document> &D) : Doc(D) {}
+ bool operator ==(const document_iterator &Other) {
+ return Doc == Other.Doc;
+ }
bool operator !=(const document_iterator &Other) {
- return Doc != Other.Doc;
+ return !(*this == Other);
}
document_iterator operator ++() {