aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-05-14 05:39:45 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-05-14 05:39:45 +0000
commit1b766d09d19ad87fa24cabd6d738d20903ed697d (patch)
tree223ad456ac9d53db1a5213d28f5b41d3c6350eeb /clang/lib/CodeGen/CodeGenModule.cpp
parent66862c2797ab9067cfa362968a1bf22c9c67475a (diff)
downloadllvm-1b766d09d19ad87fa24cabd6d738d20903ed697d.zip
llvm-1b766d09d19ad87fa24cabd6d738d20903ed697d.tar.gz
llvm-1b766d09d19ad87fa24cabd6d738d20903ed697d.tar.bz2
Revert "Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269492 as the corresponding LLVM commit was reverted due to lots of warnings. See the review thread for the original LLVM commit (r269491) for details. llvm-svn: 269549
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 57a6429..79da25c 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -141,13 +141,11 @@ CodeGenModule::CodeGenModule(ASTContext &C, const HeaderSearchOptions &HSO,
if (CodeGenOpts.hasProfileClangUse()) {
auto ReaderOrErr = llvm::IndexedInstrProfReader::create(
CodeGenOpts.ProfileInstrumentUsePath);
- if (auto E = ReaderOrErr.takeError()) {
+ if (std::error_code EC = ReaderOrErr.getError()) {
unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
"Could not read profile %0: %1");
- llvm::handleAllErrors(std::move(E), [&](const llvm::ErrorInfoBase &EI) {
- getDiags().Report(DiagID) << CodeGenOpts.ProfileInstrumentUsePath
- << EI.message();
- });
+ getDiags().Report(DiagID) << CodeGenOpts.ProfileInstrumentUsePath
+ << EC.message();
} else
PGOReader = std::move(ReaderOrErr.get());
}