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:
Vedant Kumar
2016-05-16 20:49:39 +00:00
parent 119b9304a9
commit 515ee3e025
18 changed files with 612 additions and 504 deletions
+2 -3
View File
@@ -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) {