[flang] Add -h as a synonym for help
authorRichard Barton <richard.barton@arm.com>
Sat, 18 Jul 2020 13:22:18 +0000 (14:22 +0100)
committerRichard Barton <richard.barton@arm.com>
Fri, 31 Jul 2020 14:56:37 +0000 (15:56 +0100)
As expected by user in http://lists.llvm.org/pipermail/flang-dev/2020-June/000404.html

Depends on D84856

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

flang/test/Driver/help.f90
flang/tools/f18/f18.cpp

index 66dd14a..d616295 100644 (file)
@@ -1,3 +1,4 @@
+! RUN: %f18 -h 2>&1 | FileCheck %s
 ! RUN: %f18 -help 2>&1 | FileCheck %s
 ! RUN: %f18 --help 2>&1 | FileCheck %s
 ! RUN: %f18 -? 2>&1 | FileCheck %s
index 02bd5b2..338d04e 100644 (file)
@@ -603,7 +603,7 @@ int main(int argc, char *const argv[]) {
       driver.getSymbolsSources = true;
     } else if (arg == "-byteswapio") {
       driver.byteswapio = true; // TODO: Pass to lowering, generate call
-    } else if (arg == "-help" || arg == "--help" || arg == "-?") {
+    } else if (arg == "-h" || arg == "-help" || arg == "--help" || arg == "-?") {
       llvm::errs()
           << "f18: LLVM Fortran compiler\n"
           << "\n"