diff options
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/SmallString.h | 7 | ||||
-rw-r--r-- | include/llvm/ADT/SmallVector.h | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/ADT/SmallString.h b/include/llvm/ADT/SmallString.h index 7328560..4388a85 100644 --- a/include/llvm/ADT/SmallString.h +++ b/include/llvm/ADT/SmallString.h @@ -38,6 +38,13 @@ public: // Extra methods. StringRef str() const { return StringRef(this->begin(), this->size()); } + // TODO: Make this const, if it's safe... + const char* c_str() { + this->push_back(0); + this->pop_back(); + return this->data(); + } + // Implicit conversion to StringRef. operator StringRef() const { return str(); } diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 123b85d..1c86622 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -340,13 +340,6 @@ 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); /// append - Add the specified range to the end of the SmallVector. |