From 01bfb366acf3650b91a80b922f2fc7b6e660f686 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Mon, 20 Jan 2020 20:52:12 +0800 Subject: [PATCH] [llvm-profdata] Fix hint message since argument format has changed "-sample" option is now changed to "--sample". --- llvm/test/tools/llvm-profdata/text-format-errors.test | 2 +- llvm/tools/llvm-profdata/llvm-profdata.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/test/tools/llvm-profdata/text-format-errors.test b/llvm/test/tools/llvm-profdata/text-format-errors.test index 0c5786352ba..8f7b747f9bf 100644 --- a/llvm/test/tools/llvm-profdata/text-format-errors.test +++ b/llvm/test/tools/llvm-profdata/text-format-errors.test @@ -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 diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp index 41e9abb82b1..d98934b60a8 100644 --- a/llvm/tools/llvm-profdata/llvm-profdata.cpp +++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp @@ -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); });