[llvm-commits] [llvm] r154927 - /llvm/trunk/include/llvm/Support/YAMLParser.h

Manuel Klimek klimek at google.com
Tue Apr 17 09:38:41 PDT 2012


Author: klimek
Date: Tue Apr 17 11:38:41 2012
New Revision: 154927

URL: http://llvm.org/viewvc/llvm-project?rev=154927&view=rev
Log:
Adding operator== for document_iterator.


Modified:
    llvm/trunk/include/llvm/Support/YAMLParser.h

Modified: llvm/trunk/include/llvm/Support/YAMLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLParser.h?rev=154927&r1=154926&r2=154927&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLParser.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLParser.h Tue Apr 17 11:38:41 2012
@@ -516,8 +516,11 @@
   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 ++() {





More information about the llvm-commits mailing list