summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-04-25 02:45:33 +0000
committerJustin Bogner <mail@justinbogner.com>2014-04-25 02:45:33 +0000
commitb59d7c73b0035b16ed59d0b518697185709df56b (patch)
tree781fd3bf31ca883f23c021af9a8eaa0281b57854 /llvm/test/tools
parent65fc0e2c00e84cffe07efb21d62a634730925a2e (diff)
downloadbcm5719-llvm-b59d7c73b0035b16ed59d0b518697185709df56b.tar.gz
bcm5719-llvm-b59d7c73b0035b16ed59d0b518697185709df56b.zip
ProfileData: Treat missing function counts as malformed
llvm-svn: 207172
Diffstat (limited to 'llvm/test/tools')
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/no-counts.profdata3
-rw-r--r--llvm/test/tools/llvm-profdata/errors.test3
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-profdata/Inputs/no-counts.profdata b/llvm/test/tools/llvm-profdata/Inputs/no-counts.profdata
new file mode 100644
index 00000000000..5c1fa15c086
--- /dev/null
+++ b/llvm/test/tools/llvm-profdata/Inputs/no-counts.profdata
@@ -0,0 +1,3 @@
+no_counts
+0
+0
diff --git a/llvm/test/tools/llvm-profdata/errors.test b/llvm/test/tools/llvm-profdata/errors.test
index 393e2d16856..28262efe063 100644
--- a/llvm/test/tools/llvm-profdata/errors.test
+++ b/llvm/test/tools/llvm-profdata/errors.test
@@ -11,3 +11,6 @@ INVALID-COUNT-LATER: error: {{.*}}invalid-count-later.profdata: Malformed profil
RUN: not llvm-profdata show %p/Inputs/bad-hash.profdata 2>&1 | FileCheck %s --check-prefix=BAD-HASH
RUN: not llvm-profdata merge %p/Inputs/bad-hash.profdata %p/Inputs/bad-hash.profdata -o %t.out 2>&1 | FileCheck %s --check-prefix=BAD-HASH
BAD-HASH: error: {{.*}}bad-hash.profdata: Malformed profile data
+
+RUN: not llvm-profdata show %p/Inputs/no-counts.profdata 2>&1 | FileCheck %s --check-prefix=NO-COUNTS
+NO-COUNTS: error: {{.*}}no-counts.profdata: Malformed profile data
OpenPOWER on IntegriCloud