summaryrefslogtreecommitdiff
path: root/lib/profile/InstrProfData.inc
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-05-14 05:40:00 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-05-14 05:40:00 +0000
commit697cbda1194af86c0b18cdf60f03a474ba7bbd0c (patch)
tree6e847c42f14404d5253af85c429fc4b7328c44b1 /lib/profile/InstrProfData.inc
parente0848a54e50a6acf4dc28d025a8b2aa125ccf066 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfData.inc')
-rw-r--r--lib/profile/InstrProfData.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/profile/InstrProfData.inc b/lib/profile/InstrProfData.inc
index 7358efc18..77d44f15b 100644
--- a/lib/profile/InstrProfData.inc
+++ b/lib/profile/InstrProfData.inc
@@ -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);