[llvm-profdata] Show hint for other mismatch errors when merging instr profdata
[oota-llvm.git] / tools / llvm-profdata / llvm-profdata.cpp
index f8499c30f66ac1e28655159a00612d80e9d588f2..52488af1c919c8fea4f3e803847eb813bb4b6436 100644 (file)
@@ -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;
       }
     }