summaryrefslogtreecommitdiffstats
path: root/lld/unittests/DriverTests/WinLinkDriverTest.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-11-22 22:52:15 +0000
committerRui Ueyama <ruiu@google.com>2013-11-22 22:52:15 +0000
commit82e366e78f3a6bf5cedba54b3785fa295ad441fe (patch)
tree708663b4a4e279052ce2af94a3d3745958588be8 /lld/unittests/DriverTests/WinLinkDriverTest.cpp
parent1b4a66957068224e7cad08cef53768bef1ccf000 (diff)
downloadbcm5719-llvm-82e366e78f3a6bf5cedba54b3785fa295ad441fe.tar.gz
bcm5719-llvm-82e366e78f3a6bf5cedba54b3785fa295ad441fe.zip
[PECOFF] Do not set the entry address if /noentry option is given.
This is the first step towards DLL creation support. Resource-only DLLs don't have entry point address. llvm-svn: 195510
Diffstat (limited to 'lld/unittests/DriverTests/WinLinkDriverTest.cpp')
-rw-r--r--lld/unittests/DriverTests/WinLinkDriverTest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
index 89a590fbd91..fbe6cdd8498 100644
--- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp
+++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
@@ -341,6 +341,21 @@ TEST_F(WinLinkParserTest, DisallowLib) {
}
//
+// Tests for DLL.
+//
+
+TEST_F(WinLinkParserTest, NoEntry) {
+ EXPECT_TRUE(parse("link.exe", "/noentry", "/dll", "a.obj", nullptr));
+ EXPECT_EQ("", _context.entrySymbolName());
+}
+
+TEST_F(WinLinkParserTest, NoEntryError) {
+ // /noentry without /dll is an error.
+ EXPECT_FALSE(parse("link.exe", "/noentry", "a.obj", nullptr));
+ EXPECT_EQ("/noentry must be specified with /dll\n", errorMessage());
+}
+
+//
// Tests for boolean flags.
//
OpenPOWER on IntegriCloud