aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/Twine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Twine.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/Twine.cpp7
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;