diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-11-16 01:25:13 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-11-16 01:25:13 +0000 |
commit | 8a2549febcc4e09f5573c57e10c580586d005447 (patch) | |
tree | 17e5bf9deb49a4226a78d5fc61611e7447c3f50e /include | |
parent | dc296639d9bf3b85167b2a7ec1b4110b953e98bb (diff) |
Object/Archive: Give Child a operator < for map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Object/Archive.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Object/Archive.h b/include/llvm/Object/Archive.h index b12b17e1f5..9e1369a5c6 100644 --- a/include/llvm/Object/Archive.h +++ b/include/llvm/Object/Archive.h @@ -34,6 +34,10 @@ public: return (Parent == other.Parent) && (Data.begin() == other.Data.begin()); } + bool operator <(const Child &other) const { + return Data.begin() < other.Data.begin(); + } + Child getNext() const; error_code getName(StringRef &Result) const; int getLastModified() const; @@ -64,6 +68,10 @@ public: return !(*this == other); } + bool operator <(const child_iterator &other) const { + return child < other.child; + } + child_iterator& operator++() { // Preincrement child = child.getNext(); return *this; |