================
@@ -154,3 +155,50 @@ MinidumpFile::create(MemoryBufferRef Source) {
   return std::unique_ptr<MinidumpFile>(
       new MinidumpFile(Source, Hdr, *ExpectedStreams, std::move(StreamMap)));
 }
+
+static iterator_range<MinidumpFile::FallibleMemory64Iterator>
+makeEmptyRange(Error &Err) {
+  return make_range(
+      llvm::object::MinidumpFile::FallibleMemory64Iterator::itr(
+          llvm::object::MinidumpFile::Memory64Iterator::end(), Err),
+      llvm::object::MinidumpFile::FallibleMemory64Iterator::end(
+          llvm::object::MinidumpFile::Memory64Iterator::end()));
----------------
labath wrote:

```suggestion
  return make_fallible_range(
       Memory64Iterator::end(),
       Memory64Iterator::end(), Err);
```

.. although the way I'd probably do it is to delete this function, put an `auto 
end = make_fallible_end(Memory64Iterator::end())` at the beginning of the 
`getMemory64List` function, and then do a `return make_range(end, end)` on the 
error paths.

https://github.com/llvm/llvm-project/pull/101272
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to