mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 20:33:15 +00:00
Support/ADT: Move c_str() from SmallString to SmallVectorImpl. The Windows PathV2
implementation needs it for wchar_t and SmallVectorImpl in general. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120984 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f964486771
commit
e99bbd9ac3
@ -41,12 +41,6 @@ public:
|
|||||||
// Implicit conversion to StringRef.
|
// Implicit conversion to StringRef.
|
||||||
operator StringRef() const { return str(); }
|
operator StringRef() const { return str(); }
|
||||||
|
|
||||||
const char *c_str() {
|
|
||||||
this->push_back(0);
|
|
||||||
this->pop_back();
|
|
||||||
return this->data();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Extra operators.
|
// Extra operators.
|
||||||
const SmallString &operator=(StringRef RHS) {
|
const SmallString &operator=(StringRef RHS) {
|
||||||
this->clear();
|
this->clear();
|
||||||
|
@ -340,6 +340,12 @@ public:
|
|||||||
return Result;
|
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);
|
void swap(SmallVectorImpl &RHS);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user