[lld] r191044 - [PECOFF] Ignore /errorReport command line option.
Rui Ueyama
ruiu at google.com
Thu Sep 19 15:19:40 PDT 2013
Author: ruiu
Date: Thu Sep 19 17:19:40 2013
New Revision: 191044
URL: http://llvm.org/viewvc/llvm-project?rev=191044&view=rev
Log:
[PECOFF] Ignore /errorReport command line option.
/errorReport is a command line option to let the linker to report internal
linker error information to Microsoft. For LLD that option doesn't make any
sense, so it just ignores the option.
Modified:
lld/trunk/lib/Driver/WinLinkOptions.td
lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
Modified: lld/trunk/lib/Driver/WinLinkOptions.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkOptions.td?rev=191044&r1=191043&r2=191044&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkOptions.td (original)
+++ lld/trunk/lib/Driver/WinLinkOptions.td Thu Sep 19 17:19:40 2013
@@ -56,10 +56,15 @@ def tsaware : F<"tsaware">;
def no_tsaware : F<"tsaware:no">,
HelpText<"Create non-Terminal Server aware executable">;
-// NOLOGO does nothing. It is defined only for link.exe compatibility.
-def nologo : F<"nologo">;
-
def help : F<"help">;
def help_q : F<"?">, Alias<help>;
def DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>;
+
+// The flags below do nothing. They are defined only for link.exe compatibility.
+multiclass Q<string name> {
+ def "" : Joined<["/", "-", "-?"], name#":">;
+ def _c : Separate<["/", "-", "-?"], name>, Alias<!cast<Option>(name)>;
+}
+def nologo : F<"nologo">;
+defm errorreport : Q<"errorreport">;
Modified: lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp?rev=191044&r1=191043&r2=191044&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp Thu Sep 19 17:19:40 2013
@@ -256,9 +256,11 @@ TEST_F(WinLinkParserTest, FailIfMismatch
"/failifmismatch:foo=baz", "a.out", nullptr));
}
-TEST_F(WinLinkParserTest, Nologo) {
- // NOLOGO flag is for link.exe compatibility. It's recognized but is ignored.
- EXPECT_FALSE(parse("link.exe", "/nologo", "a.obj", nullptr));
+TEST_F(WinLinkParserTest, Ignore) {
+ // There are some no-op command line options that are recognized for
+ // compatibility with link.exe.
+ EXPECT_FALSE(parse("link.exe", "/nologo", "/errorreport:prompt", "a.obj",
+ nullptr));
EXPECT_EQ("", errorMessage());
EXPECT_EQ(1, inputFileCount());
EXPECT_EQ("a.obj", inputFile(0));
More information about the llvm-commits
mailing list