From: Michael J. Spencer Date: Wed, 16 Nov 2011 01:25:13 +0000 (+0000) Subject: Object/Archive: Give Child a operator < for map. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8a2549febcc4e09f5573c57e10c580586d005447;p=oota-llvm.git 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 --- diff --git a/include/llvm/Object/Archive.h b/include/llvm/Object/Archive.h index b12b17e1f5b..9e1369a5c62 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;