summaryrefslogtreecommitdiffstats
path: root/lld/unittests/DriverTests/WinLinkDriverTest.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-10-08 21:38:10 +0000
committerRui Ueyama <ruiu@google.com>2014-10-08 21:38:10 +0000
commitecbb309e5e3ccce02368416fe5c12601ded66190 (patch)
tree59b549ce12f35d0d845cac538f89d2dee7d5ca93 /lld/unittests/DriverTests/WinLinkDriverTest.cpp
parent1aaa4bcdd1b0d834e27bb8d1a3f1a03d4ddeb079 (diff)
downloadbcm5719-llvm-ecbb309e5e3ccce02368416fe5c12601ded66190.tar.gz
bcm5719-llvm-ecbb309e5e3ccce02368416fe5c12601ded66190.zip
[PECOFF] Remember DLL names given with /delayload option.
This is a step toward full support of /delayload. llvm-svn: 219344
Diffstat (limited to 'lld/unittests/DriverTests/WinLinkDriverTest.cpp')
-rw-r--r--lld/unittests/DriverTests/WinLinkDriverTest.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
index ed87f1286bc..dde4e139310 100644
--- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp
+++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
@@ -452,6 +452,18 @@ TEST_F(WinLinkParserTest, NoEntryError) {
}
//
+// Tests for DELAYLOAD.
+//
+
+TEST_F(WinLinkParserTest, DelayLoad) {
+ EXPECT_TRUE(parse("link.exe", "/delayload:abc.dll", "/delayload:def.dll",
+ "a.obj", nullptr));
+ EXPECT_TRUE(_context.isDelayLoadDLL("abc.dll"));
+ EXPECT_TRUE(_context.isDelayLoadDLL("DEF.DLL"));
+ EXPECT_FALSE(_context.isDelayLoadDLL("xyz.dll"));
+}
+
+//
// Tests for SEH.
//
@@ -671,7 +683,7 @@ TEST_F(WinLinkParserTest, Ignore) {
// compatibility with link.exe.
EXPECT_TRUE(parse("link.exe", "/nologo", "/errorreport:prompt",
"/incremental", "/incremental:no", "/delay:unload",
- "/disallowlib:foo", "/delayload:user32", "/pdb:foo",
+ "/disallowlib:foo", "/pdb:foo",
"/pdbaltpath:bar", "/verbose", "/verbose:icf", "/wx",
"/wx:no", "/tlbid:1", "/tlbout:foo", "/idlout:foo",
"/ignore:4000", "/ignoreidl", "/implib:foo", "/safeseh",
OpenPOWER on IntegriCloud