summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/InstrProfWriter.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-05-13 20:09:39 +0000
committerVedant Kumar <vsk@apple.com>2016-05-13 20:09:39 +0000
commit064535c1eace2b43f3f628f43551422fb5d054f5 (patch)
tree0bba6f228ffb1f7500ad30aba7b9810a7d5dde8c /llvm/lib/ProfileData/InstrProfWriter.cpp
parent833b91eee8c4a33f725f5f22736c85958476f2ec (diff)
downloadbcm5719-llvm-064535c1eace2b43f3f628f43551422fb5d054f5.tar.gz
bcm5719-llvm-064535c1eace2b43f3f628f43551422fb5d054f5.zip
Revert "(HEAD -> master, origin/master, origin/HEAD) [ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
This reverts commit r269462. It fails two llvm-profdata tests. llvm-svn: 269466
Diffstat (limited to 'llvm/lib/ProfileData/InstrProfWriter.cpp')
-rw-r--r--llvm/lib/ProfileData/InstrProfWriter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ProfileData/InstrProfWriter.cpp b/llvm/lib/ProfileData/InstrProfWriter.cpp
index 9b01dac313b..d6caca2a7a9 100644
--- a/llvm/lib/ProfileData/InstrProfWriter.cpp
+++ b/llvm/lib/ProfileData/InstrProfWriter.cpp
@@ -156,7 +156,8 @@ void InstrProfWriter::setOutputSparse(bool Sparse) {
this->Sparse = Sparse;
}
-Error InstrProfWriter::addRecord(InstrProfRecord &&I, uint64_t Weight) {
+std::error_code InstrProfWriter::addRecord(InstrProfRecord &&I,
+ uint64_t Weight) {
auto &ProfileDataMap = FunctionData[I.Name];
bool NewFunc;
@@ -179,7 +180,7 @@ Error InstrProfWriter::addRecord(InstrProfRecord &&I, uint64_t Weight) {
Dest.sortValueData();
- return Dest.takeError();
+ return Dest.getError();
}
bool InstrProfWriter::shouldEncodeData(const ProfilingData &PD) {
OpenPOWER on IntegriCloud