[PATCH] D45545: [profile] Fix binary format reader error propagation.
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 11 16:38:49 PDT 2018
mtrofin created this revision.
mtrofin added reviewers: xur, davidxl, bkramer.
Herald added a subscriber: llvm-commits.
This was originally part of https://reviews.llvm.org/rL328132, and led to the discovery
of the issues addressed in https://reviews.llvm.org/rL328987. Re-landing.
Repository:
rL LLVM
https://reviews.llvm.org/D45545
Files:
lib/ProfileData/InstrProfReader.cpp
Index: lib/ProfileData/InstrProfReader.cpp
===================================================================
--- lib/ProfileData/InstrProfReader.cpp
+++ lib/ProfileData/InstrProfReader.cpp
@@ -448,23 +448,23 @@
if (atEnd())
// At this point, ValueDataStart field points to the next header.
if (Error E = readNextHeader(getNextHeaderPos()))
- return E;
+ return error(std::move(E));
// Read name ad set it in Record.
if (Error E = readName(Record))
- return E;
+ return error(std::move(E));
// Read FuncHash and set it in Record.
if (Error E = readFuncHash(Record))
- return E;
+ return error(std::move(E));
// Read raw counts and set Record.
if (Error E = readRawCounts(Record))
- return E;
+ return error(std::move(E));
// Read value data and set Record.
if (Error E = readValueProfilingData(Record))
- return E;
+ return error(std::move(E));
// Iterate.
advanceData();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45545.142096.patch
Type: text/x-patch
Size: 960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180411/31523e7c/attachment.bin>
More information about the llvm-commits
mailing list