mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Check for errors after reading a sample profile in llvm-profdata.
After reading the profile, check if the reader returned any errors before showing the profile. llvm-svn: 247873
This commit is contained in:
parent
3a461df12f
commit
c0de8306fc
@ -195,7 +195,9 @@ static int showSampleProfile(std::string Filename, bool ShowCounts,
|
||||
exitWithError(EC.message(), Filename);
|
||||
|
||||
auto Reader = std::move(ReaderOrErr.get());
|
||||
Reader->read();
|
||||
if (std::error_code EC = Reader->read())
|
||||
exitWithError(EC.message(), Filename);
|
||||
|
||||
if (ShowAllFunctions || ShowFunction.empty())
|
||||
Reader->dump(OS);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user