--- /dev/null
+# RUN: llvm-ar h | FileCheck %s
+# RUN: llvm-ar -h | FileCheck %s
+# RUN: llvm-ar -help | FileCheck %s
+# RUN: llvm-ar --help | FileCheck %s
+
+# CHECK: USAGE: llvm-ar
llvm-ar -M [<mri-script]
OPTIONS:
- --format - Archive format to create
+ --format - archive format to create
=default - default
=gnu - gnu
=darwin - darwin
=bsd - bsd
- --plugin=<string> - Ignored for compatibility
- --help - Display available options
- --version - Display the version of this program
+ --plugin=<string> - ignored for compatibility
+ -h --help - display this help and exit
+ --version - print the version and exit
@<file> - read options from <file>
OPERATIONS:
}
static bool handleGenericOption(StringRef arg) {
- if (arg == "-help" || arg == "--help") {
+ if (arg == "h" || arg.startswith("-h") || arg == "--help") {
printHelpMessage();
return true;
}