Index: llvm/trunk/test/tools/llvm-cvtres/symbols.test =================================================================== --- llvm/trunk/test/tools/llvm-cvtres/symbols.test +++ llvm/trunk/test/tools/llvm-cvtres/symbols.test @@ -10,6 +10,10 @@ RUN: llvm-cvtres /verbose /out:%t %p/Inputs/test_resource.res RUN: llvm-readobj -symbols %t | FileCheck %s +// Test that parameters can be preceded by '-' in addition to '/': +RUN: llvm-cvtres -verbose -machine:X86 -out:%t %p/Inputs/test_resource.res +RUN: llvm-readobj -symbols %t | FileCheck %s + CHECK: Name: $R000000 CHECK-NEXT: Value: 0 CHECK-NEXT: Section: .rsrc$02 Index: llvm/trunk/tools/llvm-cvtres/Opts.td =================================================================== --- llvm/trunk/tools/llvm-cvtres/Opts.td +++ llvm/trunk/tools/llvm-cvtres/Opts.td @@ -1,11 +1,13 @@ include "llvm/Option/OptParser.td" -def DEFINE : Joined<["/"], "DEFINE:">, HelpText<"">, MetaVarName<"symbol">; -def FOLDDUPS : Flag<["/"], "FOLDDUPS:">, HelpText<"">; -def MACHINE : Joined<["/"], "MACHINE:">, HelpText<"">, MetaVarName<"{ARM|ARM64|EBC|IA64|X64|X86}">; -def NOLOGO : Flag<["/"], "NOLOGO">, HelpText<"">; -def OUT : Joined<["/"], "OUT:">, HelpText<"">, MetaVarName<"filename">; -def READONLY : Flag<["/"], "READONLY">, HelpText<"">; -def VERBOSE : Flag<["/"], "VERBOSE">, HelpText<"">; -def HELP : Flag<["/"], "HELP">; -def H : Flag<["/"], "H">, Alias; +// All the switches can be preceded by either '/' or '-'. + +def DEFINE : Joined<["/", "-"], "DEFINE:">, HelpText<"">, MetaVarName<"symbol">; +def FOLDDUPS : Flag<["/", "-"], "FOLDDUPS:">, HelpText<"">; +def MACHINE : Joined<["/", "-"], "MACHINE:">, HelpText<"">, MetaVarName<"{ARM|ARM64|EBC|IA64|X64|X86}">; +def NOLOGO : Flag<["/", "-"], "NOLOGO">, HelpText<"">; +def OUT : Joined<["/", "-"], "OUT:">, HelpText<"">, MetaVarName<"filename">; +def READONLY : Flag<["/", "-"], "READONLY">, HelpText<"">; +def VERBOSE : Flag<["/", "-"], "VERBOSE">, HelpText<"">; +def HELP : Flag<["/", "-"], "HELP">; +def H : Flag<["/", "-"], "H">, Alias;