Object/Archive: Give Child a operator < for map.

llvm-svn: 144757
This commit is contained in:
Michael J. Spencer 2011-11-16 01:25:13 +00:00
parent ecdd31181d
commit ca48ae0194
1 changed files with 8 additions and 0 deletions

View File

@ -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;