projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2a5661
)
Add SmallString::str (which returns a StringRef); this is more efficient than
author
Daniel Dunbar
<daniel@zuster.org>
Wed, 19 Aug 2009 19:57:55 +0000
(19:57 +0000)
committer
Daniel Dunbar
<daniel@zuster.org>
Wed, 19 Aug 2009 19:57:55 +0000
(19:57 +0000)
c_str().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79453
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/SmallString.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/SmallString.h
b/include/llvm/ADT/SmallString.h
index 7d3bff6685abd5f192a7ce5e39f5135004fffaa7..fe97807d244d9d2ac13fc3373bbf05224e3a76e2 100644
(file)
--- a/
include/llvm/ADT/SmallString.h
+++ b/
include/llvm/ADT/SmallString.h
@@
-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();