Support/ADT: Move c_str() from SmallString to SmallVectorImpl. The Windows PathV2

implementation needs it for wchar_t and SmallVectorImpl in general.

llvm-svn: 120984
This commit is contained in:
Michael J. Spencer 2010-12-06 04:27:42 +00:00
parent 9f2af628a6
commit 911742c4b7
2 changed files with 6 additions and 6 deletions

View File

@ -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();

View File

@ -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);