diff options
| author | Sam McCall <sam.mccall@gmail.com> | 2017-10-19 08:13:49 +0000 |
|---|---|---|
| committer | Sam McCall <sam.mccall@gmail.com> | 2017-10-19 08:13:49 +0000 |
| commit | f309f0fd70df33687ff4ad19e4a7ef72c76c1441 (patch) | |
| tree | 3b8896e57ff9a8046934ba4538c56c1904adfe96 /llvm/include | |
| parent | 448291ef5eef26993f7b05afb90ab3f5b7a863f3 (diff) | |
| download | bcm5719-llvm-f309f0fd70df33687ff4ad19e4a7ef72c76c1441.tar.gz bcm5719-llvm-f309f0fd70df33687ff4ad19e4a7ef72c76c1441.zip | |
Const fix for YAMLParser.
llvm-svn: 316151
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Support/YAMLParser.h | 6 |
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."); |

