aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-05-19 03:54:45 +0000
committerVedant Kumar <vsk@apple.com>2016-05-19 03:54:45 +0000
commit9152fd17e9a0b2fc8edf41503c026ade1d0d5b1b (patch)
treeded89a21e5bbd6aa84185c4e53395cb593d615c5 /llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
parentb784ed36c0cefd3d3289417143deecb6a7b81622 (diff)
downloadllvm-9152fd17e9a0b2fc8edf41503c026ade1d0d5b1b.zip
llvm-9152fd17e9a0b2fc8edf41503c026ade1d0d5b1b.tar.gz
llvm-9152fd17e9a0b2fc8edf41503c026ade1d0d5b1b.tar.bz2
Retry^3 "[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: - Fix error message printing in llvm-profdata. - Check errors in loadTestingFormat() + annotateAllFunctions(). - Defer error handling in InstrProfIterator to InstrProfReader. - Remove the base ProfError class to work around an MSVC ICE. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 270020
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 60f77d47..34967ef 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -388,9 +388,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();