From 3d2c6fc38ee4db4b1755d49413876a00ca948ac8 Mon Sep 17 00:00:00 2001 From: Nathan Slingerland Date: Tue, 17 Nov 2015 23:37:09 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253400 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-profdata/llvm-profdata.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/llvm-profdata/llvm-profdata.cpp b/tools/llvm-profdata/llvm-profdata.cpp index f8499c30f66..52488af1c91 100644 --- a/tools/llvm-profdata/llvm-profdata.cpp +++ b/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(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; } } -- 2.34.1