summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-04-06 04:16:48 +0000
committerNico Weber <nicolasweber@gmx.de>2015-04-06 04:16:48 +0000
commit176efac95bba0ba9e13c6924adc59a3ac61dcae6 (patch)
tree583b7e30dd43a2b303e3b2990431d010a55c5986 /clang/lib/CodeGen/CodeGenModule.cpp
parent86fe2feb72a514eb6354cac2408b354ab7bfbdc7 (diff)
downloadbcm5719-llvm-176efac95bba0ba9e13c6924adc59a3ac61dcae6.tar.gz
bcm5719-llvm-176efac95bba0ba9e13c6924adc59a3ac61dcae6.zip
Don't crash when passing a non-existent file to -fprofile-instr-use=.
Fixes a regression from r229434. llvm-svn: 234141
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 7fce6208d44..dd9d6305caa 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -147,8 +147,8 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO,
unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
"Could not read profile: %0");
getDiags().Report(DiagID) << EC.message();
- }
- PGOReader = std::move(ReaderOrErr.get());
+ } else
+ PGOReader = std::move(ReaderOrErr.get());
}
// If coverage mapping generation is enabled, create the
OpenPOWER on IntegriCloud