From 8a2549febcc4e09f5573c57e10c580586d005447 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Wed, 16 Nov 2011 01:25:13 +0000 Subject: 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 --- include/llvm/Object/Archive.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/llvm/Object/Archive.h') 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; -- cgit v1.2.3-18-g5258