diff options
-rw-r--r-- | include/llvm/ADT/SmallString.h | 6 | ||||
-rw-r--r-- | include/llvm/ADT/SmallVector.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/ADT/SmallString.h b/include/llvm/ADT/SmallString.h index 05bd8a42c6..7328560822 100644 --- a/include/llvm/ADT/SmallString.h +++ b/include/llvm/ADT/SmallString.h @@ -41,12 +41,6 @@ public: // Implicit conversion to StringRef. operator StringRef() const { return str(); } - const char *c_str() { - this->push_back(0); - this->pop_back(); - return this->data(); - } - // Extra operators. const SmallString &operator=(StringRef RHS) { this->clear(); diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 0c9f7eb634..123b85daff 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -340,6 +340,12 @@ public: return Result; } + // TODO: Make this const, if it's safe... + typename SuperClass::const_pointer c_str() { + push_back(0); + pop_back(); + return this->data(); + } void swap(SmallVectorImpl &RHS); |