Skip to content

Commit 6338655

Browse files
RichBarton-Armzmodem
authored andcommitted
[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 (cherry picked from commit 30e45f3)
1 parent 4ad21aa commit 6338655

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

flang/test/Driver/help.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
! RUN: %f18 -h 2>&1 | FileCheck %s
12
! RUN: %f18 -help 2>&1 | FileCheck %s
23
! RUN: %f18 --help 2>&1 | FileCheck %s
34
! RUN: %f18 -? 2>&1 | FileCheck %s

flang/tools/f18/f18.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ int main(int argc, char *const argv[]) {
600600
driver.getDefinitionArgs = {arguments[0], arguments[1], arguments[2]};
601601
} else if (arg == "-fget-symbols-sources") {
602602
driver.getSymbolsSources = true;
603-
} else if (arg == "-help" || arg == "--help" || arg == "-?") {
603+
} else if (arg == "-h" || arg == "-help" || arg == "--help" || arg == "-?") {
604604
llvm::errs()
605605
<< "f18: LLVM Fortran compiler\n"
606606
<< "\n"

0 commit comments

Comments
 (0)