forked from OSchip/llvm-project
[profile] Fix binary format reader error propagation.
Summary: This was originally part of rL328132, and led to the discovery of the issues addressed in rL328987. Re-landing. Reviewers: xur, davidxl, bkramer Reviewed By: bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45545 llvm-svn: 330029
This commit is contained in:
parent
52098cf5da
commit
5b63803d1f
|
@ -448,23 +448,23 @@ Error RawInstrProfReader<IntPtrT>::readNextRecord(NamedInstrProfRecord &Record)
|
||||||
if (atEnd())
|
if (atEnd())
|
||||||
// At this point, ValueDataStart field points to the next header.
|
// At this point, ValueDataStart field points to the next header.
|
||||||
if (Error E = readNextHeader(getNextHeaderPos()))
|
if (Error E = readNextHeader(getNextHeaderPos()))
|
||||||
return E;
|
return error(std::move(E));
|
||||||
|
|
||||||
// Read name ad set it in Record.
|
// Read name ad set it in Record.
|
||||||
if (Error E = readName(Record))
|
if (Error E = readName(Record))
|
||||||
return E;
|
return error(std::move(E));
|
||||||
|
|
||||||
// Read FuncHash and set it in Record.
|
// Read FuncHash and set it in Record.
|
||||||
if (Error E = readFuncHash(Record))
|
if (Error E = readFuncHash(Record))
|
||||||
return E;
|
return error(std::move(E));
|
||||||
|
|
||||||
// Read raw counts and set Record.
|
// Read raw counts and set Record.
|
||||||
if (Error E = readRawCounts(Record))
|
if (Error E = readRawCounts(Record))
|
||||||
return E;
|
return error(std::move(E));
|
||||||
|
|
||||||
// Read value data and set Record.
|
// Read value data and set Record.
|
||||||
if (Error E = readValueProfilingData(Record))
|
if (Error E = readValueProfilingData(Record))
|
||||||
return E;
|
return error(std::move(E));
|
||||||
|
|
||||||
// Iterate.
|
// Iterate.
|
||||||
advanceData();
|
advanceData();
|
||||||
|
|
Loading…
Reference in New Issue