1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

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 cd2878d421
commit e5298b0f07
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);