Import llvm::SmallString and dependencies.

Update StringRef and StringExtras with SmallVector functions.
This commit is contained in:
Peter Johnson
2015-07-22 22:29:46 -07:00
parent 593bc28446
commit 79f732f239
11 changed files with 1800 additions and 11 deletions

View File

@@ -18,6 +18,7 @@
#include <iterator>
namespace llvm {
template<typename T> class SmallVectorImpl;
/// hexdigit - Return the hexadecimal character for the
/// given number \p X (which should be less than 16).
@@ -125,6 +126,12 @@ StringRef::size_type StrInStrNoCase(StringRef s1, StringRef s2);
std::pair<StringRef, StringRef> getToken(StringRef Source,
StringRef Delimiters = " \t\n\v\f\r");
/// SplitString - Split up the specified string according to the specified
/// delimiters, appending the result fragments to the output list.
void SplitString(StringRef Source,
SmallVectorImpl<StringRef> &OutFragments,
StringRef Delimiters = " \t\n\v\f\r");
/// HashString - Hash function for strings.
///
/// This is the Bernstein hash function.