[lldb][NFC] Make ArrayRef initialization more obvious in lldb-test.cpp

Seems like this code raised some alarm bells as it looks like an ArrayRef
to a temporary initializer list, but it's actually just calling the ArrayRef(T*, T*)
constructor. Let's clarify this and directly call the right ArrayRef constructor here.

Fixes rdar://problem/59176052
This commit is contained in:
Raphael Isemann 2020-02-25 09:11:13 +01:00
parent 29e2cb8749
commit ea6b95dc2f
1 changed files with 1 additions and 1 deletions

View File

@ -846,7 +846,7 @@ static void dumpSectionList(LinePrinter &Printer, const SectionList &List, bool
if (opts::object::SectionContents) {
lldb_private::DataExtractor Data;
S->GetSectionData(Data);
ArrayRef<uint8_t> Bytes = {Data.GetDataStart(), Data.GetDataEnd()};
ArrayRef<uint8_t> Bytes(Data.GetDataStart(), Data.GetDataEnd());
Printer.formatBinary("Data: ", Bytes, 0);
}