summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/Driver/WinLinkOptions.td2
-rw-r--r--lld/unittests/DriverTests/WinLinkDriverTest.cpp7
2 files changed, 8 insertions, 1 deletions
diff --git a/lld/lib/Driver/WinLinkOptions.td b/lld/lib/Driver/WinLinkOptions.td
index ca42291177e..c189b024bb9 100644
--- a/lld/lib/Driver/WinLinkOptions.td
+++ b/lld/lib/Driver/WinLinkOptions.td
@@ -7,7 +7,7 @@ class _Separate<string name> : Separate<["-", "/"], name>;
class _Joined<string name, Option alias> : Joined<["-", "/"], name>,
Alias<alias>;
-def mllvm : _Flag<"mllvm">, HelpText<"Options to pass to LLVM">;
+def mllvm : _Separate<"mllvm">, HelpText<"Options to pass to LLVM">;
def out : _Separate<"out">, HelpText<"Path to file to write output">;
def out_c : _Joined<"out:", out>;
diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
index 89fea5a3097..da4e434a615 100644
--- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp
+++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
@@ -66,6 +66,13 @@ TEST_F(WinLinkParserTest, UnixStyleOption) {
EXPECT_EQ("a.obj", inputFile(0));
}
+TEST_F(WinLinkParserTest, Mllvm) {
+ EXPECT_FALSE(parse("link.exe", "-mllvm", "-debug", "a.obj", nullptr));
+ const std::vector<const char *> &options = _info.llvmOptions();
+ EXPECT_EQ(1U, options.size());
+ EXPECT_EQ("-debug", options[0]);
+}
+
TEST_F(WinLinkParserTest, NoFileExtension) {
EXPECT_FALSE(parse("link.exe", "foo", "bar", nullptr));
EXPECT_EQ("foo.exe", _info.outputPath());
OpenPOWER on IntegriCloud