diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-20 07:09:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-20 07:09:17 +0000 |
commit | 0fbdfc3664830e8387c13bf817c44e8b71085142 (patch) | |
tree | da9d8f1a093ca43069f6d4b50f48e7397b99fe4c /include/llvm/ADT/SmallString.h | |
parent | 4379efced76ef5b4e90d1e235e745acd2bc2a9e9 (diff) | |
download | llvm-0fbdfc3664830e8387c13bf817c44e8b71085142.tar.gz llvm-0fbdfc3664830e8387c13bf817c44e8b71085142.tar.bz2 llvm-0fbdfc3664830e8387c13bf817c44e8b71085142.tar.xz |
add an operator= to assign to smallstring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/SmallString.h')
-rw-r--r-- | include/llvm/ADT/SmallString.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/ADT/SmallString.h b/include/llvm/ADT/SmallString.h index b25d1eee30..05b12d627e 100644 --- a/include/llvm/ADT/SmallString.h +++ b/include/llvm/ADT/SmallString.h @@ -46,6 +46,11 @@ public: } // Extra operators. + const SmallString &operator=(const char *RHS) { + this->clear(); + return *this += RHS; + } + SmallString &operator+=(const char *RHS) { this->append(RHS, RHS+strlen(RHS)); return *this; |