summaryrefslogtreecommitdiff
path: root/tools/llvm-profdata/llvm-profdata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r--tools/llvm-profdata/llvm-profdata.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/llvm-profdata/llvm-profdata.cpp b/tools/llvm-profdata/llvm-profdata.cpp
index 5a0e27fd6d3..397b5239692 100644
--- a/tools/llvm-profdata/llvm-profdata.cpp
+++ b/tools/llvm-profdata/llvm-profdata.cpp
@@ -137,6 +137,8 @@ int show_main(int argc, const char *argv[]) {
if (Show && ShowCounts)
OS << "]\n";
}
+ if (Reader->hasError())
+ exitWithError(Reader->getError().message(), Filename);
if (ShowAllFunctions || !ShowFunction.empty())
OS << "Functions shown: " << ShownFunctions << "\n";