[PATCH] D45545: [profile] Fix binary format reader error propagation.

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 13 08:08:07 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL330029: [profile] Fix binary format reader error propagation. (authored by mtrofin, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D45545

Files:
  llvm/trunk/lib/ProfileData/InstrProfReader.cpp


Index: llvm/trunk/lib/ProfileData/InstrProfReader.cpp
===================================================================
--- llvm/trunk/lib/ProfileData/InstrProfReader.cpp
+++ llvm/trunk/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.142415.patch
Type: text/x-patch
Size: 993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180413/5bf4e0ba/attachment.bin>


More information about the llvm-commits mailing list