After reading the profile, check if the reader returned any errors
before showing the profile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247873
91177308-0d34-0410-b5e6-
96231b3b80d8
exitWithError(EC.message(), Filename);
auto Reader = std::move(ReaderOrErr.get());
exitWithError(EC.message(), Filename);
auto Reader = std::move(ReaderOrErr.get());
+ if (std::error_code EC = Reader->read())
+ exitWithError(EC.message(), Filename);
+
if (ShowAllFunctions || ShowFunction.empty())
Reader->dump(OS);
else
if (ShowAllFunctions || ShowFunction.empty())
Reader->dump(OS);
else