diff options
author | Rui Ueyama <ruiu@google.com> | 2013-07-26 20:54:36 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2013-07-26 20:54:36 +0000 |
commit | 9dcbf8b3f68c37a509eba91d3c8dcdef68ca09a2 (patch) | |
tree | bb07b6d2f6e6168c66f41a001288d063c2a20e22 | |
parent | 8bce21c154fa363b3d8ae0d8fdba4ffec6931df4 (diff) | |
download | bcm5719-llvm-9dcbf8b3f68c37a509eba91d3c8dcdef68ca09a2.tar.gz bcm5719-llvm-9dcbf8b3f68c37a509eba91d3c8dcdef68ca09a2.zip |
[PECOFF][Driver] Fix a bug that -mllvm does not take any arguments.
llvm-svn: 187243
-rw-r--r-- | lld/lib/Driver/WinLinkOptions.td | 2 | ||||
-rw-r--r-- | lld/unittests/DriverTests/WinLinkDriverTest.cpp | 7 |
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()); |