diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2009-11-13 02:18:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2009-11-13 02:18:25 +0000 |
commit | c78c0c99a0fe1703ae72fc51e440aaa8e4e19e91 (patch) | |
tree | 0a822d49c72aa91f86d0961e50807a81e156bd0e /include/llvm/ADT/StringRef.h | |
parent | 1e608819aa26c06b1552521469f2211339e3bfe0 (diff) |
Switch to smallvector. Also fix issue with using unsigend for MaxSplit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/StringRef.h')
-rw-r--r-- | include/llvm/ADT/StringRef.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h index 6ccb37d346..6b17eb22de 100644 --- a/include/llvm/ADT/StringRef.h +++ b/include/llvm/ADT/StringRef.h @@ -15,15 +15,9 @@ #include <cstring> #include <string> -namespace std { - template<typename _Tp> - class allocator; - - template<typename _Tp, typename _Alloc> - class vector; -} - namespace llvm { + template<typename T> + class SmallVectorImpl; /// StringRef - Represent a constant reference to a string, i.e. a character /// array and a length, which need not be null terminated. @@ -337,8 +331,8 @@ namespace llvm { /// \param Separator - The string to split on. /// \param MaxSplit - The maximum number of times the string is split. /// \parm KeepEmpty - True if empty substring should be added. - void split(std::vector<StringRef, std::allocator<StringRef> > &A, - StringRef Separator, unsigned MaxSplit = -1, + void split(SmallVectorImpl<StringRef> &A, + StringRef Separator, int MaxSplit = -1, bool KeepEmpty = true) const; /// rsplit - Split into two substrings around the last occurence of a |