summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2015-06-25 22:56:00 +0000
committerDiego Novillo <dnovillo@google.com>2015-06-25 22:56:00 +0000
commit5aecacb275d1e0d1bcc59f6b3a3596c1a8a500d9 (patch)
treef38eadb88d315e3ff02e0508d9635cb783e56081 /clang/lib/CodeGen/CodeGenModule.cpp
parent164a6098a921dd7a1c9d724c7cd98de4d84de301 (diff)
downloadbcm5719-llvm-5aecacb275d1e0d1bcc59f6b3a3596c1a8a500d9.tar.gz
bcm5719-llvm-5aecacb275d1e0d1bcc59f6b3a3596c1a8a500d9.zip
Display profile file name when emitting a file not found diagnostic.
When a profile file cannot be opened, we used to display just the error message but not the name of the profile the compiler was trying to open. This will become useful in the next set of patches that introduce GCC-compatible flags to specify profiles. llvm-svn: 240715
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 2dd5414795e..bd7b44e4133 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -145,8 +145,9 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO,
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();
+ "Could not read profile %0: %1");
+ getDiags().Report(DiagID) << CodeGenOpts.InstrProfileInput
+ << EC.message();
} else
PGOReader = std::move(ReaderOrErr.get());
}
OpenPOWER on IntegriCloud