summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatEntity.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-12 05:49:54 +0000
committerZachary Turner <zturner@google.com>2017-05-12 05:49:54 +0000
commit2833321f09efd9387257d17a3ef5128841142e6f (patch)
tree734c009de6f4895529effceec687d377434ba2d9 /lldb/source/Core/FormatEntity.cpp
parent41c99364602a6965c30be674d75451ad87658d8c (diff)
downloadbcm5719-llvm-2833321f09efd9387257d17a3ef5128841142e6f.tar.gz
bcm5719-llvm-2833321f09efd9387257d17a3ef5128841142e6f.zip
Update StructuredData::String to return StringRefs.
It was returning const std::string& which was leading to unnecessary copies all over the place, and preventing people from doing things like Dict->GetValueForKeyAsString("foo", ref); llvm-svn: 302875
Diffstat (limited to 'lldb/source/Core/FormatEntity.cpp')
-rw-r--r--lldb/source/Core/FormatEntity.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index 05f986978e5..9fb294aad2f 100644
--- a/lldb/source/Core/FormatEntity.cpp
+++ b/lldb/source/Core/FormatEntity.cpp
@@ -1050,7 +1050,7 @@ static bool FormatThreadExtendedInfoRecurse(
s.Printf("%f", value->GetAsFloat()->GetValue());
return true;
} else if (value->GetType() == StructuredData::Type::eTypeString) {
- s.Printf("%s", value->GetAsString()->GetValue().c_str());
+ s.Format("{0}", value->GetAsString()->GetValue());
return true;
} else if (value->GetType() == StructuredData::Type::eTypeArray) {
if (value->GetAsArray()->GetSize() > 0) {
OpenPOWER on IntegriCloud