mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-21 04:41:34 +00:00
Change SmallString::operator{=,+=} to take a StringRef.
llvm-svn: 79729
This commit is contained in:
parent
8014c7031a
commit
ea514f5421
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user