mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
Add SmallString::str (which returns a StringRef); this is more efficient than
c_str(). llvm-svn: 79453
This commit is contained in:
parent
15b0649d13
commit
cb45b94032
@ -15,6 +15,7 @@
|
||||
#define LLVM_ADT_SMALLSTRING_H
|
||||
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/DataTypes.h"
|
||||
#include <cstring>
|
||||
|
||||
@ -45,6 +46,8 @@ public:
|
||||
return this->begin();
|
||||
}
|
||||
|
||||
StringRef str() const { return StringRef(this->begin(), this->size()); }
|
||||
|
||||
// Extra operators.
|
||||
const SmallString &operator=(const char *RHS) {
|
||||
this->clear();
|
||||
|
Loading…
Reference in New Issue
Block a user