projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbb8137
)
Add an operator< for SmallVector.
author
Dan Gohman
<gohman@apple.com>
Fri, 30 May 2008 22:37:47 +0000
(22:37 +0000)
committer
Dan Gohman
<gohman@apple.com>
Fri, 30 May 2008 22:37:47 +0000
(22:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51791
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/SmallVector.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/SmallVector.h
b/include/llvm/ADT/SmallVector.h
index 843d561b6bc73b5b30ca3a4440853a2aa30106f8..715f28c279654c75228b5aaefa0f5abcd3fc68c4 100644
(file)
--- a/
include/llvm/ADT/SmallVector.h
+++ b/
include/llvm/ADT/SmallVector.h
@@
-307,6
+307,11
@@
public:
return true;
}
bool operator!=(const SmallVectorImpl &RHS) const { return !(*this == RHS); }
+
+ bool operator<(const SmallVectorImpl &RHS) const {
+ return std::lexicographical_compare(begin(), end(),
+ RHS.begin(), RHS.end());
+ }
private:
/// isSmall - Return true if this is a smallvector which has not had dynamic