[llvm] r253400 - [llvm-profdata] Show hint for other mismatch errors when merging instr profdata
Nathan Slingerland via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 17 15:37:09 PST 2015
Author: slingn
Date: Tue Nov 17 17:37:09 2015
New Revision: 253400
URL: http://llvm.org/viewvc/llvm-project?rev=253400&view=rev
Log:
[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.
Modified:
llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp
Modified: llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp?rev=253400&r1=253399&r2=253400&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp (original)
+++ llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp Tue Nov 17 17:37:09 2015
@@ -75,9 +75,13 @@ static void handleMergeWriterError(std::
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;
}
}
More information about the llvm-commits
mailing list