summaryrefslogtreecommitdiff
path: root/tools/llvm-profdata/llvm-profdata.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-03-23 20:55:53 +0000
committerJustin Bogner <mail@justinbogner.com>2014-03-23 20:55:53 +0000
commitf5afb78a9dbb62e69b3c59aeeeb57e1d560d1e23 (patch)
tree342d6b87fdbe63287f519b6a0e2416f1e8369afa /tools/llvm-profdata/llvm-profdata.cpp
parent5ecdfc1004585b7d0a5fa026420de0f9065d73d4 (diff)
llvm-profdata: Check for bad data in the show command
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204573 91177308-0d34-0410-b5e6-96231b3b80d8
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";