[llvm-commits] [llvm] r144757 - /llvm/trunk/include/llvm/Object/Archive.h
Michael J. Spencer
bigcheesegs at gmail.com
Tue Nov 15 17:25:13 PST 2011
Author: mspencer
Date: Tue Nov 15 19:25:13 2011
New Revision: 144757
URL: http://llvm.org/viewvc/llvm-project?rev=144757&view=rev
Log:
Object/Archive: Give Child a operator < for map.
Modified:
llvm/trunk/include/llvm/Object/Archive.h
Modified: llvm/trunk/include/llvm/Object/Archive.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/Archive.h?rev=144757&r1=144756&r2=144757&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/Archive.h (original)
+++ llvm/trunk/include/llvm/Object/Archive.h Tue Nov 15 19:25:13 2011
@@ -34,6 +34,10 @@
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 @@
return !(*this == other);
}
+ bool operator <(const child_iterator &other) const {
+ return child < other.child;
+ }
+
child_iterator& operator++() { // Preincrement
child = child.getNext();
return *this;
More information about the llvm-commits
mailing list