[llvm-commits] [llvm] r59715 - /llvm/trunk/include/llvm/ADT/SmallString.h
Chris Lattner
sabre at nondot.org
Wed Nov 19 23:09:17 PST 2008
Author: lattner
Date: Thu Nov 20 01:09:17 2008
New Revision: 59715
URL: http://llvm.org/viewvc/llvm-project?rev=59715&view=rev
Log:
add an operator= to assign to smallstring.
Modified:
llvm/trunk/include/llvm/ADT/SmallString.h
Modified: llvm/trunk/include/llvm/ADT/SmallString.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallString.h?rev=59715&r1=59714&r2=59715&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallString.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallString.h Thu Nov 20 01:09:17 2008
@@ -46,6 +46,11 @@
}
// 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;
More information about the llvm-commits
mailing list