[PATCH] D84857: [flang] Add -h as a synonym for help
Richard Barton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 08:38:47 PDT 2020
richard.barton.arm created this revision.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
richard.barton.arm requested review of this revision.
As expected by user in http://lists.llvm.org/pipermail/flang-dev/2020-June/000404.html
Depends on D84856 <https://reviews.llvm.org/D84856>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D84857
Files:
flang/test/Driver/help.f90
flang/tools/f18/f18.cpp
Index: flang/tools/f18/f18.cpp
===================================================================
--- flang/tools/f18/f18.cpp
+++ flang/tools/f18/f18.cpp
@@ -603,7 +603,7 @@
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"
Index: flang/test/Driver/help.f90
===================================================================
--- flang/test/Driver/help.f90
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84857.281618.patch
Type: text/x-patch
Size: 895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200729/1741eb2e/attachment.bin>
More information about the llvm-commits
mailing list