From f5afb78a9dbb62e69b3c59aeeeb57e1d560d1e23 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Sun, 23 Mar 2014 20:55:53 +0000 Subject: 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 --- tools/llvm-profdata/llvm-profdata.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/llvm-profdata/llvm-profdata.cpp b/tools/llvm-profdata/llvm-profdata.cpp index 5a0e27fd6d..397b523969 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"; -- cgit v1.2.3