[llvm] r346470 - [llvm-rc] Support joined or separate spelling for /fo flag
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 8 19:16:53 PST 2018
Author: phosek
Date: Thu Nov 8 19:16:53 2018
New Revision: 346470
URL: http://llvm.org/viewvc/llvm-project?rev=346470&view=rev
Log:
[llvm-rc] Support joined or separate spelling for /fo flag
CMake invokes rc using the joined spelling which appears to be supported
by Microsoft's rc implementation, so we should support it as well.
Differential Revision: https://reviews.llvm.org/D54191
Added:
llvm/trunk/test/tools/llvm-rc/Inputs/empty.rc
llvm/trunk/test/tools/llvm-rc/flags.test
Modified:
llvm/trunk/tools/llvm-rc/Opts.td
Added: llvm/trunk/test/tools/llvm-rc/Inputs/empty.rc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-rc/Inputs/empty.rc?rev=346470&view=auto
==============================================================================
(empty)
Added: llvm/trunk/test/tools/llvm-rc/flags.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-rc/flags.test?rev=346470&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-rc/flags.test (added)
+++ llvm/trunk/test/tools/llvm-rc/flags.test Thu Nov 8 19:16:53 2018
@@ -0,0 +1,4 @@
+; RUN: llvm-rc /dry-run /FO %t %p/Inputs/empty.rc 2>&1 | FileCheck %s --allow-empty --check-prefix=FO
+; RUN: llvm-rc /dry-run /FO%t %p/Inputs/empty.rc 2>&1 | FileCheck %s --allow-empty --check-prefix=FO
+
+; FO-NOT: Exactly one input file should be provided.
Modified: llvm/trunk/tools/llvm-rc/Opts.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-rc/Opts.td?rev=346470&r1=346469&r2=346470&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-rc/Opts.td (original)
+++ llvm/trunk/tools/llvm-rc/Opts.td Thu Nov 8 19:16:53 2018
@@ -4,7 +4,7 @@ include "llvm/Option/OptParser.td"
// These options seem to be important for the tool
// and should be implemented.
-def FILEOUT : Separate<[ "/", "-" ], "FO">,
+def FILEOUT : JoinedOrSeparate<[ "/", "-" ], "FO">,
HelpText<"Change the output file location.">;
def DEFINE : Separate<[ "/", "-" ], "D">,
More information about the llvm-commits
mailing list