diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-18 20:30:12 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:12:03 +0000 |
| commit | c9157d925c489f07ba9c0b2ce47e5149b75969a5 (patch) | |
| tree | 08bc4a3d9cad3f9ebffa558ddf140b9d9257b219 /contrib/llvm-project/llvm/lib/Support/Twine.cpp | |
| parent | 2a66844f606a35d68ad8a8061f4bea204274b3bc (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Twine.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Support/Twine.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/Twine.cpp b/contrib/llvm-project/llvm/lib/Support/Twine.cpp index 8bbfd0815a40..495b9cf2dbd6 100644 --- a/contrib/llvm-project/llvm/lib/Support/Twine.cpp +++ b/contrib/llvm-project/llvm/lib/Support/Twine.cpp @@ -44,6 +44,8 @@ StringRef Twine::toNullTerminatedStringRef(SmallVectorImpl<char> &Out) const { const std::string *str = LHS.stdString; return StringRef(str->c_str(), str->size()); } + case StringLiteralKind: + return StringRef(LHS.ptrAndLength.ptr, LHS.ptrAndLength.length); default: break; } @@ -69,6 +71,7 @@ void Twine::printOneChild(raw_ostream &OS, Child Ptr, OS << *Ptr.stdString; break; case Twine::PtrAndLengthKind: + case Twine::StringLiteralKind: OS << StringRef(Ptr.ptrAndLength.ptr, Ptr.ptrAndLength.length); break; case Twine::FormatvObjectKind: @@ -124,6 +127,10 @@ void Twine::printOneChildRepr(raw_ostream &OS, Child Ptr, OS << "ptrAndLength:\"" << StringRef(Ptr.ptrAndLength.ptr, Ptr.ptrAndLength.length) << "\""; break; + case Twine::StringLiteralKind: + OS << "constexprPtrAndLength:\"" + << StringRef(Ptr.ptrAndLength.ptr, Ptr.ptrAndLength.length) << "\""; + break; case Twine::FormatvObjectKind: OS << "formatv:\"" << *Ptr.formatvObject << "\""; break; |
