[llvm] [Minidump] Support multiple exceptions in a minidump (PR #107319)
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 00:55:49 PDT 2024
================
@@ -53,6 +53,12 @@ Expected<std::string> MinidumpFile::getString(size_t Offset) const {
return Result;
}
+iterator_range<llvm::object::MinidumpFile::ExceptionStreamsIterator>
+MinidumpFile::getExceptionStreams() const {
+ return make_range(ExceptionStreamsIterator::begin(ExceptionStreams, this),
+ ExceptionStreamsIterator::end());
----------------
labath wrote:
Yeah, sorry, I didn't really test this cause I didn't mean it to be taken literally -- just as an illustration of the kind of ArrayRef that you should create. I guess it was necessary to do something like `ArrayRef(end(), end())` (or in the worst case `ArrayRef<T>(end(), end())`) to resolve the ambiguity.
Comparing the sizes is okay (there's the risk of false positives when comparing iterators from two different files, but those kinds are UB for normal iterators anyway), although I think the pointer comparison would produce results more similar to what typical iterators (e.g. raw pointers) would do in these situations.
https://github.com/llvm/llvm-project/pull/107319
More information about the llvm-commits
mailing list