[flang-commits] [flang] 30e45f3 - [flang] Add -h as a synonym for help

Richard Barton via flang-commits flang-commits at lists.llvm.org
Fri Jul 31 07:59:51 PDT 2020


Author: Richard Barton
Date: 2020-07-31T15:56:37+01:00
New Revision: 30e45f339eb0841dc7fe27fad119cc5db0c052f3

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

LOG: [flang] Add -h as a synonym for help

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/flang/test/Driver/help.f90 b/flang/test/Driver/help.f90
index 66dd14aa5a86..d6162954a872 100644
--- a/flang/test/Driver/help.f90
+++ b/flang/test/Driver/help.f90
@@ -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

diff  --git a/flang/tools/f18/f18.cpp b/flang/tools/f18/f18.cpp
index 02bd5b26805a..338d04e7e8f5 100644
--- a/flang/tools/f18/f18.cpp
+++ b/flang/tools/f18/f18.cpp
@@ -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"


        


More information about the flang-commits mailing list