[compiler-rt] r269550 - Revert "Reapply "[ProfileData] (compiler-rt) Use Error in InstrProf and Coverage, NFC""

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 22:40:00 PDT 2016


Author: chandlerc
Date: Sat May 14 00:40:00 2016
New Revision: 269550

URL: http://llvm.org/viewvc/llvm-project?rev=269550&view=rev
Log:
Revert "Reapply "[ProfileData] (compiler-rt) Use Error in InstrProf and Coverage, NFC""

This reverts commit r269493 as the corresponding LLVM commit was
reverted due to lots of warnings. See the review thread for the original
LLVM commit (r269491) for details.

Modified:
    compiler-rt/trunk/lib/profile/InstrProfData.inc

Modified: compiler-rt/trunk/lib/profile/InstrProfData.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfData.inc?rev=269550&r1=269549&r2=269550&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfData.inc (original)
+++ compiler-rt/trunk/lib/profile/InstrProfData.inc Sat May 14 00:40:00 2016
@@ -295,15 +295,16 @@ typedef struct ValueProfData {
   static std::unique_ptr<ValueProfData>
   serializeFrom(const InstrProfRecord &Record);
   /*!
-   * Check the integrity of the record.
+   * Check the integrity of the record. Return the error code when
+   * an error is detected, otherwise return instrprof_error::success.
    */
-  Error checkIntegrity();
+  instrprof_error checkIntegrity();
   /*!
    * Return a pointer to \c ValueProfileData instance ready to be read.
    * All data in the instance are properly byte swapped. The input
    * data is assumed to be in little endian order.
    */
-  static Expected<std::unique_ptr<ValueProfData>>
+  static ErrorOr<std::unique_ptr<ValueProfData>>
   getValueProfData(const unsigned char *SrcBuffer,
                    const unsigned char *const SrcBufferEnd,
                    support::endianness SrcDataEndianness);




More information about the llvm-commits mailing list