llvm.org GIT mirror llvm / 04087d0
Add SmallString::str (which returns a StringRef); this is more efficient than c_str(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79453 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 11 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1414 #define LLVM_ADT_SMALLSTRING_H
1515
1616 #include "llvm/ADT/SmallVector.h"
17 #include "llvm/ADT/StringRef.h"
1718 #include "llvm/Support/DataTypes.h"
1819 #include
1920
4445 return this->begin();
4546 }
4647
48 StringRef str() const { return StringRef(this->begin(), this->size()); }
49
4750 // Extra operators.
4851 const SmallString &operator=(const char *RHS) {
4952 this->clear();