summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/YAMLParser.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/YAMLParser.h b/llvm/include/llvm/Support/YAMLParser.h
index 549da3ccad5..626507947a7 100644
--- a/llvm/include/llvm/Support/YAMLParser.h
+++ b/llvm/include/llvm/Support/YAMLParser.h
@@ -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.");
OpenPOWER on IntegriCloud