From df41bd89a56d03aa88cdfc2f8b1255f8ed3fbeca Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Fri, 13 May 2016 21:50:56 +0000 Subject: Retry "[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. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 269491 --- llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp') 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(); -- cgit v1.1