@@ -219,70 +219,67 @@ class MinidumpFile : public Binary {
219
219
bool IsEnd;
220
220
};
221
221
222
- class ExceptionStreamsIterator {
222
+ class ExceptionStreamsIterator {
223
223
public:
224
-
225
- static ExceptionStreamsIterator begin (ArrayRef<minidump::Directory> Streams, const MinidumpFile *File) {
224
+ static ExceptionStreamsIterator begin (ArrayRef<minidump::Directory> Streams,
225
+ const MinidumpFile *File) {
226
226
return ExceptionStreamsIterator (Streams, File);
227
227
}
228
228
229
- static ExceptionStreamsIterator end () {
230
- return ExceptionStreamsIterator ();
231
- }
229
+ static ExceptionStreamsIterator end () { return ExceptionStreamsIterator (); }
232
230
233
231
bool operator ==(const ExceptionStreamsIterator &R) const {
234
232
return Streams.empty () && R.Streams .empty ();
235
233
}
236
234
237
- bool operator !=(const ExceptionStreamsIterator &R) const { return !(*this == R); }
235
+ bool operator !=(const ExceptionStreamsIterator &R) const {
236
+ return !(*this == R);
237
+ }
238
238
239
- Expected<const minidump::ExceptionStream &>
240
- operator *() {
239
+ Expected<const minidump::ExceptionStream &> operator *() {
241
240
return ReadCurrent ();
242
241
}
243
242
244
- Expected<const minidump::ExceptionStream &>
245
- operator ->() {
243
+ Expected<const minidump::ExceptionStream &> operator ->() {
246
244
return ReadCurrent ();
247
245
}
248
246
249
- ExceptionStreamsIterator &
250
- operator ++ () {
247
+ ExceptionStreamsIterator &operator ++() {
251
248
if (!Streams.empty ())
252
249
Streams = Streams.drop_front ();
253
250
254
-
255
251
return *this ;
256
252
}
257
253
258
254
private:
259
- ExceptionStreamsIterator (ArrayRef<minidump::Directory> Streams, const MinidumpFile *File)
260
- : Streams(Streams), File(File) {}
255
+ ExceptionStreamsIterator (ArrayRef<minidump::Directory> Streams,
256
+ const MinidumpFile *File)
257
+ : Streams(Streams), File(File) {}
261
258
262
- ExceptionStreamsIterator () : Streams(ArrayRef<minidump::Directory>()), File(nullptr ) {}
259
+ ExceptionStreamsIterator ()
260
+ : Streams(ArrayRef<minidump::Directory>()), File(nullptr ) {}
263
261
264
262
ArrayRef<minidump::Directory> Streams;
265
263
const MinidumpFile *File;
266
264
267
- Expected<const minidump::ExceptionStream&> ReadCurrent () {
265
+ Expected<const minidump::ExceptionStream &> ReadCurrent () {
268
266
assert (!Streams.empty ());
269
267
Expected<const minidump::ExceptionStream &> ExceptionStream =
270
268
File->getExceptionStream (Streams.front ());
271
269
if (!ExceptionStream)
272
270
return ExceptionStream.takeError ();
273
-
271
+
274
272
return ExceptionStream;
275
273
}
276
274
};
277
275
278
276
using FallibleMemory64Iterator = llvm::fallible_iterator<Memory64Iterator>;
279
277
280
- // / Returns an iterator that reads each exception stream independently. The
281
- // / contents of the exception strema are not validated before being read, an
278
+ // / Returns an iterator that reads each exception stream independently. The
279
+ // / contents of the exception strema are not validated before being read, an
282
280
// / error will be returned if the stream is not large enough to contain an
283
281
// / exception stream, or if the stream points beyond the end of the file.
284
- iterator_range<ExceptionStreamsIterator>
285
- getExceptionStreams () const ;
282
+ iterator_range<ExceptionStreamsIterator> getExceptionStreams () const ;
286
283
287
284
// / Returns an iterator that pairs each descriptor with it's respective
288
285
// / content from the Memory64List stream. An error is returned if the file
@@ -325,7 +322,8 @@ class ExceptionStreamsIterator {
325
322
DenseMap<minidump::StreamType, std::size_t > StreamMap,
326
323
std::vector<minidump::Directory> ExceptionStreams)
327
324
: Binary(ID_Minidump, Source), Header(Header), Streams(Streams),
328
- StreamMap(std::move(StreamMap)), ExceptionStreams(std::move(ExceptionStreams)) {}
325
+ StreamMap(std::move(StreamMap)),
326
+ ExceptionStreams(std::move(ExceptionStreams)) {}
329
327
330
328
ArrayRef<uint8_t > getData () const {
331
329
return arrayRefFromStringRef (Data.getBuffer ());
0 commit comments