diff options
-rw-r--r-- | include/llvm/ADT/SmallString.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/SmallString.h b/include/llvm/ADT/SmallString.h index c39d887c23..035462515a 100644 --- a/include/llvm/ADT/SmallString.h +++ b/include/llvm/ADT/SmallString.h @@ -38,6 +38,12 @@ public: // Extra methods. StringRef str() const { return StringRef(this->begin(), this->size()); } + const char *c_str() { + this->push_back(0); + this->pop_back(); + return this->data(); + } + // Extra operators. const SmallString &operator=(StringRef RHS) { this->clear(); |