From 27c88dab08bcad7374ae1cdd1a5e621f8c281cd9 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 24 Sep 2013 17:59:30 +0000 Subject: [PATCH] [PECOFF] Fix /? option and add a test for the flag. llvm-svn: 191320 --- lld/lib/Driver/WinLinkOptions.td | 2 +- lld/test/pecoff/help.test | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 lld/test/pecoff/help.test diff --git a/lld/lib/Driver/WinLinkOptions.td b/lld/lib/Driver/WinLinkOptions.td index 8a074171fc93..7c5101f8c87b 100644 --- a/lld/lib/Driver/WinLinkOptions.td +++ b/lld/lib/Driver/WinLinkOptions.td @@ -62,7 +62,7 @@ defm dynamicbase : B<"dynamicbase", "Disable address space layout randomization">; def help : F<"help">; -def help_q : F<"?">, Alias; +def help_q : Flag<["/?", "-?"], "">, Alias; def DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>; diff --git a/lld/test/pecoff/help.test b/lld/test/pecoff/help.test new file mode 100644 index 000000000000..f5e9c358f1a8 --- /dev/null +++ b/lld/test/pecoff/help.test @@ -0,0 +1,4 @@ +# RUN: not lld -flavor link /help | FileCheck %s +# RUN: not lld -flavor link '/?' | FileCheck %s + +CHECK: USAGE