[lld] r191320 - [PECOFF] Fix /? option and add a test for the flag.

Rui Ueyama ruiu at google.com
Tue Sep 24 10:59:30 PDT 2013


Author: ruiu
Date: Tue Sep 24 12:59:30 2013
New Revision: 191320

URL: http://llvm.org/viewvc/llvm-project?rev=191320&view=rev
Log:
[PECOFF] Fix /? option and add a test for the flag.

Added:
    lld/trunk/test/pecoff/help.test
Modified:
    lld/trunk/lib/Driver/WinLinkOptions.td

Modified: lld/trunk/lib/Driver/WinLinkOptions.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkOptions.td?rev=191320&r1=191319&r2=191320&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkOptions.td (original)
+++ lld/trunk/lib/Driver/WinLinkOptions.td Tue Sep 24 12:59:30 2013
@@ -62,7 +62,7 @@ defm dynamicbase : B<"dynamicbase",
      "Disable address space layout randomization">;
 
 def help : F<"help">;
-def help_q : F<"?">, Alias<help>;
+def help_q : Flag<["/?", "-?"], "">, Alias<help>;
 
 def DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>;
 

Added: lld/trunk/test/pecoff/help.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/help.test?rev=191320&view=auto
==============================================================================
--- lld/trunk/test/pecoff/help.test (added)
+++ lld/trunk/test/pecoff/help.test Tue Sep 24 12:59:30 2013
@@ -0,0 +1,4 @@
+# RUN: not lld -flavor link /help | FileCheck %s
+# RUN: not lld -flavor link '/?' | FileCheck %s
+
+CHECK: USAGE





More information about the llvm-commits mailing list