summaryrefslogtreecommitdiff
path: root/lib/profile
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-05-16 21:05:05 +0000
committerVedant Kumar <vsk@apple.com>2016-05-16 21:05:05 +0000
commitc87f7410a648527864dee5c0c887a4ecaa09579a (patch)
tree7e05acd52fd7ba6522575c295addfe6ac8ac424c /lib/profile
parenta4c3fe41edf165cdbe699e7635fdb6f66f93931f (diff)
Revert "Reapply^2 "[ProfileData] (compiler-rt) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269696. The llvm commit does not pass the MSVC bot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile')
-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 a9f3c50bf..49c3266c2 100644
--- a/lib/profile/InstrProfData.inc
+++ b/lib/profile/InstrProfData.inc
@@ -322,15 +322,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);