[llvm-profdata] Fix hint message since argument format has changed

"-sample" option is now changed to "--sample".
This commit is contained in:
Yi Kong 2020-01-20 20:52:12 +08:00
parent 8b2eb7c494
commit 01bfb366ac
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ NO-COUNTS: error: {{.*}}no-counts.proftext: Malformed instrumentation profile da
4- Detect binary input
RUN: not llvm-profdata show %p/Inputs/text-format-errors.text.bin 2>&1 | FileCheck %s --check-prefix=BINARY
BINARY: error: {{.+}}: Unrecognized instrumentation profile encoding format
BINARY: Perhaps you forgot to use the -sample option?
BINARY: Perhaps you forgot to use the --sample option?
5- Detect malformed value profile data
RUN: not llvm-profdata show %p/Inputs/vp-malform.proftext 2>&1 | FileCheck %s --check-prefix=VP

View File

@ -70,8 +70,8 @@ static void exitWithError(Error E, StringRef Whence = "") {
instrprof_error instrError = IPE.get();
StringRef Hint = "";
if (instrError == instrprof_error::unrecognized_format) {
// Hint for common error of forgetting -sample for sample profiles.
Hint = "Perhaps you forgot to use the -sample option?";
// Hint for common error of forgetting --sample for sample profiles.
Hint = "Perhaps you forgot to use the --sample option?";
}
exitWithError(IPE.message(), Whence, Hint);
});