Skip to content

Commit 0539008

Browse files
committed
[rebranch][lldb] Update StringPrinter::SetData reference
14f4430 changed `StringPrinter::SetData` to take a rvalue to prevent needless copies.
1 parent a1e9fcb commit 0539008

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lldb/source/Plugins/Language/Swift/SwiftFormatters.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,17 +277,16 @@ bool lldb_private::formatters::swift::StringGuts_SummaryProvider(
277277
return false;
278278

279279
uint64_t buffer[2] = {raw0, raw1};
280-
DataExtractor data(buffer, count, process->GetByteOrder(), ptrSize);
281280

282281
StringPrinter::ReadBufferAndDumpToStreamOptions options(read_options);
283-
options.SetData(data);
282+
options.SetData(
283+
DataExtractor(buffer, count, process->GetByteOrder(), ptrSize));
284284
options.SetStream(&stream);
285285
options.SetSourceSize(count);
286286
options.SetBinaryZeroIsTerminator(false);
287287
options.SetEscapeStyle(StringPrinter::EscapeStyle::Swift);
288288
return StringPrinter::ReadBufferAndDumpToStream<
289289
StringPrinter::StringElementType::UTF8>(options);
290-
291290
}
292291

293292
uint64_t count = raw0 & 0x0000FFFFFFFFFFFF;

0 commit comments

Comments
 (0)