[llvm] [Minidump] Support multiple exceptions in a minidump (PR #107319)
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 01:22:38 PDT 2024
================
@@ -216,8 +219,68 @@ class MinidumpFile : public Binary {
bool IsEnd;
};
+ class ExceptionStreamsIterator {
+ public:
+ static ExceptionStreamsIterator begin(ArrayRef<minidump::Directory> Streams,
+ const MinidumpFile *File) {
+ return ExceptionStreamsIterator(Streams, File);
+ }
+
+ static ExceptionStreamsIterator end() { return ExceptionStreamsIterator(); }
+
+ bool operator==(const ExceptionStreamsIterator &R) const {
+ return Streams.empty() && R.Streams.empty();
----------------
labath wrote:
```suggestion
return Streams.begin() == R.Streams.begin();
```
So that it also works for non-end iterators. (You just need to be careful to construct the end iterator with an `[end, end)` ArrayRef instead of `[null, null)`
https://github.com/llvm/llvm-project/pull/107319
More information about the llvm-commits
mailing list