aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Object/Archive.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Object/Archive.h')
-rw-r--r--include/llvm/Object/Archive.h8
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;