[llvm] r316151 - Const fix for YAMLParser.

Sam McCall via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 01:13:49 PDT 2017


Author: sammccall
Date: Thu Oct 19 01:13:49 2017
New Revision: 316151

URL: http://llvm.org/viewvc/llvm-project?rev=316151&view=rev
Log:
Const fix for YAMLParser.

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=316151&r1=316150&r2=316151&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLParser.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLParser.h Thu Oct 19 01:13:49 2017
@@ -572,13 +572,15 @@ public:
   document_iterator() = default;
   document_iterator(std::unique_ptr<Document> &D) : Doc(&D) {}
 
-  bool operator==(const document_iterator &Other) {
+  bool operator==(const document_iterator &Other) const {
     if (isAtEnd() || Other.isAtEnd())
       return isAtEnd() && Other.isAtEnd();
 
     return Doc == Other.Doc;
   }
-  bool operator!=(const document_iterator &Other) { return !(*this == Other); }
+  bool operator!=(const document_iterator &Other) const {
+    return !(*this == Other);
+  }
 
   document_iterator operator++() {
     assert(Doc && "incrementing iterator past the end.");




More information about the llvm-commits mailing list