[lld] r191469 - [PECOFF] Enable input file logging if /debug is given.
Rui Ueyama
ruiu at google.com
Thu Sep 26 15:46:05 PDT 2013
Author: ruiu
Date: Thu Sep 26 17:46:04 2013
New Revision: 191469
URL: http://llvm.org/viewvc/llvm-project?rev=191469&view=rev
Log:
[PECOFF] Enable input file logging if /debug is given.
Modified:
lld/trunk/lib/Driver/WinLinkDriver.cpp
lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=191469&r1=191468&r2=191469&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Thu Sep 26 17:46:04 2013
@@ -414,6 +414,9 @@ bool WinLinkDriver::parse(int argc, cons
// LLD is not yet capable of creating a PDB file, so /debug does not have
// any effect, other than disabling dead stripping.
ctx.setDeadStripping(false);
+
+ // Prints out input files during core linking to help debugging.
+ ctx.setLogInputFiles(true);
break;
case OPT_force:
Modified: lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp?rev=191469&r1=191468&r2=191469&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp Thu Sep 26 17:46:04 2013
@@ -61,6 +61,7 @@ TEST_F(WinLinkParserTest, Basic) {
EXPECT_TRUE(_context.isTerminalServerAware());
EXPECT_TRUE(_context.getDynamicBaseEnabled());
EXPECT_TRUE(_context.deadStrip());
+ EXPECT_FALSE(_context.logInputFiles());
}
TEST_F(WinLinkParserTest, StartsWithHyphen) {
@@ -318,6 +319,7 @@ TEST_F(WinLinkParserTest, SwapRunFromNet
TEST_F(WinLinkParserTest, Debug) {
EXPECT_TRUE(parse("link.exe", "/debug", "a.out", nullptr));
EXPECT_FALSE(_context.deadStrip());
+ EXPECT_TRUE(_context.logInputFiles());
}
TEST_F(WinLinkParserTest, Fixed) {
More information about the llvm-commits
mailing list