aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-05-16 20:49:39 +0000
committerVedant Kumar <vsk@apple.com>2016-05-16 20:49:39 +0000
commit7cb2fd5904df50f6ed133a6e2bffcc2dd61a3452 (patch)
treead017c1b38cdb183ad96013680443badd55792b5 /llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
parentdd2c1741323486d6b96c9b1167d87928cb4eac08 (diff)
downloadllvm-7cb2fd5904df50f6ed133a6e2bffcc2dd61a3452.zip
llvm-7cb2fd5904df50f6ed133a6e2bffcc2dd61a3452.tar.gz
llvm-7cb2fd5904df50f6ed133a6e2bffcc2dd61a3452.tar.bz2
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 llvm-svn: 269694
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
index 930001f..11369d6 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -374,9 +374,9 @@ void InstrProfiling::emitNameData() {
return;
std::string CompressedNameStr;
- if (auto EC = collectPGOFuncNameStrings(ReferencedNames, CompressedNameStr,
+ if (Error E = collectPGOFuncNameStrings(ReferencedNames, CompressedNameStr,
DoNameCompression)) {
- llvm::report_fatal_error(EC.message(), false);
+ llvm::report_fatal_error(toString(std::move(E)), false);
}
auto &Ctx = M->getContext();