forked from OSchip/llvm-project
Object/Archive: Give Child a operator < for map.
llvm-svn: 144757
This commit is contained in:
parent
ecdd31181d
commit
ca48ae0194
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue