diff options
author | Tanya Lattner <tonic@nondot.org> | 2009-10-13 06:01:01 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2009-10-13 06:01:01 +0000 |
commit | 94ea8e3ce8cab765ed3b783d35c48b83af9ec3dc (patch) | |
tree | 8fcbab95e6766578ca8e1a782980b8880bad6a12 | |
parent | 901cb73cc5640a6405e7d7f8f5d4b8627482a04f (diff) | |
download | llvm-94ea8e3ce8cab765ed3b783d35c48b83af9ec3dc.tar.gz |
Merge 79729 from mainline.
Change SmallString::operator{=,+=} to take a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@83946 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/ADT/SmallString.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/ADT/SmallString.h b/include/llvm/ADT/SmallString.h index 852c32cec955..d5856ac9f1f1 100644 --- a/include/llvm/ADT/SmallString.h +++ b/include/llvm/ADT/SmallString.h @@ -41,13 +41,13 @@ public: StringRef str() const { return StringRef(this->begin(), this->size()); } // Extra operators. - const SmallString &operator=(const char *RHS) { + const SmallString &operator=(StringRef RHS) { this->clear(); return *this += RHS; } - SmallString &operator+=(const char *RHS) { - this->append(RHS, RHS+strlen(RHS)); + SmallString &operator+=(StringRef RHS) { + this->append(RHS.begin(), RHS.end()); return *this; } SmallString &operator+=(char C) { |