We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d080c74 commit 565ba9aCopy full SHA for 565ba9a
llvm/lib/Transforms/IPO/UnpredictableProfileLoader.cpp
@@ -182,7 +182,11 @@ bool UnpredictableProfileLoaderPass::loadSampleProfile(Module &M) {
182
}
183
184
ReaderPtr = std::move(ReaderOrErr.get());
185
- ReaderPtr->read();
+ if (std::error_code EC = ReaderPtr->read()) {
186
+ std::string Msg = "Profile reading failed: " + EC.message();
187
+ Ctx.diagnose(DiagnosticInfoSampleProfile(ProfileFile, Msg));
188
+ return false;
189
+ }
190
191
return true;
192
};
0 commit comments