summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/ADT/SmallString.h6
-rw-r--r--llvm/include/llvm/ADT/SmallVector.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/include/llvm/ADT/SmallString.h b/llvm/include/llvm/ADT/SmallString.h
index 05bd8a42c67..73285608221 100644
--- a/llvm/include/llvm/ADT/SmallString.h
+++ b/llvm/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/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h
index 0c9f7eb6345..123b85daff8 100644
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/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);
OpenPOWER on IntegriCloud