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

Yi Kong via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 04:57:24 PST 2020


Author: Yi Kong
Date: 2020-01-20T20:57:03+08:00
New Revision: 01bfb366acf3650b91a80b922f2fc7b6e660f686

URL: https://github.com/llvm/llvm-project/commit/01bfb366acf3650b91a80b922f2fc7b6e660f686
DIFF: https://github.com/llvm/llvm-project/commit/01bfb366acf3650b91a80b922f2fc7b6e660f686.diff

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

"-sample" option is now changed to "--sample".

Added: 
    

Modified: 
    llvm/test/tools/llvm-profdata/text-format-errors.test
    llvm/tools/llvm-profdata/llvm-profdata.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-profdata/text-format-errors.test b/llvm/test/tools/llvm-profdata/text-format-errors.test
index 0c5786352ba7..8f7b747f9bf9 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 41e9abb82b1f..d98934b60a8b 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);
     });


        


More information about the llvm-commits mailing list