summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-02-16 21:29:05 +0000
committerJustin Bogner <mail@justinbogner.com>2015-02-16 21:29:05 +0000
commitd29a4a381073d403b3a19dd85dc5c7e736aaf272 (patch)
tree5b0d49fe2bb5f37b01efcf505a3f5131c1436c04 /clang/lib/CodeGen/CodeGenModule.cpp
parentab89ed7dd5745277edf2fff846c0d6895a4560e0 (diff)
downloadbcm5719-llvm-d29a4a381073d403b3a19dd85dc5c7e736aaf272.tar.gz
bcm5719-llvm-d29a4a381073d403b3a19dd85dc5c7e736aaf272.zip
InstrProf: Update for LLVM API change
Update for the API change in r229433 llvm-svn: 229434
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 711184b5b7b..8404972fa09 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -140,12 +140,14 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO,
RRData = new RREntrypoints();
if (!CodeGenOpts.InstrProfileInput.empty()) {
- if (std::error_code EC = llvm::IndexedInstrProfReader::create(
- CodeGenOpts.InstrProfileInput, PGOReader)) {
+ auto ReaderOrErr =
+ llvm::IndexedInstrProfReader::create(CodeGenOpts.InstrProfileInput);
+ if (std::error_code EC = ReaderOrErr.getError()) {
unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
"Could not read profile: %0");
getDiags().Report(DiagID) << EC.message();
}
+ PGOReader = std::move(ReaderOrErr.get());
}
// If coverage mapping generation is enabled, create the
OpenPOWER on IntegriCloud