[llvm] bab6902 - [llvm-rc] Improve help printouts

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 13:33:26 PDT 2023


Author: Martin Storsjö
Date: 2023-07-07T23:32:28+03:00
New Revision: bab6902eba55026a829d232629f99ac276936ef0

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

LOG: [llvm-rc] Improve help printouts

This more clearly identifies the tool as llvm-rc.

This should hopefully allow Meson to check for parts of these strings
in the output of "$CMD /?" when detecting the kind of resource compiler
tool, to allow Meson to recognize llvm-rc.

Differential Revision: https://reviews.llvm.org/D154545

Added: 
    

Modified: 
    llvm/test/tools/llvm-rc/helpmsg.test
    llvm/tools/llvm-rc/llvm-rc.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-rc/helpmsg.test b/llvm/test/tools/llvm-rc/helpmsg.test
index 60a99a472656fd..ecda426e3280aa 100644
--- a/llvm/test/tools/llvm-rc/helpmsg.test
+++ b/llvm/test/tools/llvm-rc/helpmsg.test
@@ -3,8 +3,8 @@
 ; RUN: 
diff  %t1 %t2
 ; RUN: FileCheck -input-file=%t1 %s
 
-; CHECK:  OVERVIEW: Resource Converter
-; CHECK-DAG:  USAGE: rc [options] file...
+; CHECK:  OVERVIEW: LLVM Resource Converter
+; CHECK-DAG:  USAGE: llvm-rc [options] file...
 ; CHECK-DAG:  OPTIONS:
 ; CHECK-NEXT:    /?          Display this help and exit.
 ; CHECK-NEXT:    /C <value>  Set the codepage used for input strings.

diff  --git a/llvm/tools/llvm-rc/llvm-rc.cpp b/llvm/tools/llvm-rc/llvm-rc.cpp
index d964321401a462..a476a659f856c2 100644
--- a/llvm/tools/llvm-rc/llvm-rc.cpp
+++ b/llvm/tools/llvm-rc/llvm-rc.cpp
@@ -521,7 +521,8 @@ RcOptions parseRcOptions(ArrayRef<const char *> ArgsArr,
 
   // The tool prints nothing when invoked with no command-line arguments.
   if (InputArgs.hasArg(OPT_help)) {
-    T.printHelp(outs(), "rc [options] file...", "Resource Converter", false);
+    T.printHelp(outs(), "llvm-rc [options] file...", "LLVM Resource Converter",
+                false);
     exit(0);
   }
 


        


More information about the llvm-commits mailing list