From 11bf2ace556da018c65163557fb97704b1cf88e4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 30 May 2008 22:37:47 +0000 Subject: [PATCH] Add an operator< for SmallVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51791 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/SmallVector.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 843d561b6bc..715f28c2796 100644 --- 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