aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/SmallString.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/ADT/SmallString.h b/include/llvm/ADT/SmallString.h
index 852c32c..d5856ac 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) {