Skip to content

Commit d498717

Browse files
fixup! rewrite empty response for clarity
1 parent 52aae17 commit d498717

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lldb/source/Target/Process.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,8 +1979,10 @@ Process::ReadMemoryRanges(llvm::ArrayRef<Range<lldb::addr_t, size_t>> ranges,
19791979
// If the buffer is not large enough, this is a programmer error.
19801980
// In production builds, gracefully fail by returning empty chunks.
19811981
assert(buffer.size() >= total_ranges_len);
1982-
if (buffer.size() < total_ranges_len)
1983-
return llvm::SmallVector<llvm::MutableArrayRef<uint8_t>>(ranges.size());
1982+
if (buffer.size() < total_ranges_len) {
1983+
llvm::MutableArrayRef<uint8_t> empty;
1984+
return {ranges.size(), empty};
1985+
}
19841986

19851987
llvm::SmallVector<llvm::MutableArrayRef<uint8_t>> results;
19861988

0 commit comments

Comments
 (0)