llvm.org GIT mirror llvm / 94ea8e3
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 Tanya Lattner 11 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
4040 StringRef str() const { return StringRef(this->begin(), this->size()); }
4141
4242 // Extra operators.
43 const SmallString &operator=(const char *RHS) {
43 const SmallString &operator=(StringRef RHS) {
4444 this->clear();
4545 return *this += RHS;
4646 }
4747
48 SmallString &operator+=(const char *RHS) {
49 this->append(RHS, RHS+strlen(RHS));
48 SmallString &operator+=(StringRef RHS) {
49 this->append(RHS.begin(), RHS.end());
5050 return *this;
5151 }
5252 SmallString &operator+=(char C) {