Change SmallString::operator{=,+=} to take a StringRef.

llvm-svn: 79729
This commit is contained in:
Daniel Dunbar 2009-08-22 06:06:46 +00:00
parent 8014c7031a
commit ea514f5421

View File

@ -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) {