mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
Transition InstrProf and Coverage over to the stricter Error/Expected interface. Changes since the initial commit: - Address undefined-var-template warning. - Fix error message printing in llvm-profdata. - Check errors in loadTestingFormat() + annotateAllFunctions(). - Defer error handling in InstrProfIterator to InstrProfReader. Differential Revision: http://reviews.llvm.org/D19901 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269694 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -156,8 +156,7 @@ void InstrProfWriter::setOutputSparse(bool Sparse) {
|
||||
this->Sparse = Sparse;
|
||||
}
|
||||
|
||||
std::error_code InstrProfWriter::addRecord(InstrProfRecord &&I,
|
||||
uint64_t Weight) {
|
||||
Error InstrProfWriter::addRecord(InstrProfRecord &&I, uint64_t Weight) {
|
||||
auto &ProfileDataMap = FunctionData[I.Name];
|
||||
|
||||
bool NewFunc;
|
||||
@@ -180,7 +179,7 @@ std::error_code InstrProfWriter::addRecord(InstrProfRecord &&I,
|
||||
|
||||
Dest.sortValueData();
|
||||
|
||||
return Dest.getError();
|
||||
return Dest.takeError();
|
||||
}
|
||||
|
||||
bool InstrProfWriter::shouldEncodeData(const ProfilingData &PD) {
|
||||
|
||||
Reference in New Issue
Block a user