summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-profdata/llvm-profdata.cpp
diff options
context:
space:
mode:
authorNathan Slingerland <slingn@gmail.com>2015-11-17 23:37:09 +0000
committerNathan Slingerland <slingn@gmail.com>2015-11-17 23:37:09 +0000
commit11c938d1227feb41c34c614c91fae2a30d9fbfaf (patch)
tree553476efe554867faa9506c3aa1c5041ea93909b /llvm/tools/llvm-profdata/llvm-profdata.cpp
parent4722f1921ae4620d23c0531935d7488eaed5e9a8 (diff)
downloadbcm5719-llvm-11c938d1227feb41c34c614c91fae2a30d9fbfaf.tar.gz
bcm5719-llvm-11c938d1227feb41c34c614c91fae2a30d9fbfaf.zip
[llvm-profdata] Show hint for other mismatch errors when merging instr profdata
Missed bit of feedback from D14720. Show the same "Make sure that all profile data to be merged is generated from the same binary." hint for hash mismatch and value site count mismatch as we now do for counter mismatch when merging incompatible instrumentation profile data. llvm-svn: 253400
Diffstat (limited to 'llvm/tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r--llvm/tools/llvm-profdata/llvm-profdata.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index f8499c30f66..52488af1c91 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -75,9 +75,13 @@ static void handleMergeWriterError(std::error_code &Error,
StringRef Hint = "";
if (Error.category() == instrprof_category()) {
instrprof_error instrError = static_cast<instrprof_error>(Error.value());
- if (instrError == instrprof_error::count_mismatch) {
+ switch (instrError) {
+ case instrprof_error::hash_mismatch:
+ case instrprof_error::count_mismatch:
+ case instrprof_error::value_site_count_mismatch:
Hint = "Make sure that all profile data to be merged is generated " \
"from the same binary.";
+ break;
}
}
OpenPOWER on IntegriCloud