diff options
| author | Dan Gohman <gohman@apple.com> | 2008-05-30 22:37:47 +0000 | 
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-05-30 22:37:47 +0000 | 
| commit | 52227dbfdbb41dacf28cb7661b86b593b66b9ecc (patch) | |
| tree | 7e59f09c7d164049c7e41619cca89bbd1da29ee6 /llvm | |
| parent | c5e21e4f38136b3874fdb0e302056c6b20e1ff2f (diff) | |
| download | bcm5719-llvm-52227dbfdbb41dacf28cb7661b86b593b66b9ecc.tar.gz bcm5719-llvm-52227dbfdbb41dacf28cb7661b86b593b66b9ecc.zip  | |
Add an operator< for SmallVector.
llvm-svn: 51791
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/ADT/SmallVector.h | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h index 843d561b6bc..715f28c2796 100644 --- a/llvm/include/llvm/ADT/SmallVector.h +++ b/llvm/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  | 

