mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +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:
parent
cd2878d421
commit
e5298b0f07
@ -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();
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user