summaryrefslogtreecommitdiffstats
path: root/lld/unittests/DriverTests/WinLinkDriverTest.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-12-16 09:15:58 +0000
committerRui Ueyama <ruiu@google.com>2013-12-16 09:15:58 +0000
commita6fddabbf1cd2b5b4081a1dd28e5ec8639fdd330 (patch)
treedbb4eeac1f35f1a3cd252969090078e66c01987d /lld/unittests/DriverTests/WinLinkDriverTest.cpp
parent4eaa0492ca83e5580f36ae306dd453abf949197f (diff)
downloadbcm5719-llvm-a6fddabbf1cd2b5b4081a1dd28e5ec8639fdd330.tar.gz
bcm5719-llvm-a6fddabbf1cd2b5b4081a1dd28e5ec8639fdd330.zip
[PECOFF] Add a check for duplicate export ordinals.
llvm-svn: 197373
Diffstat (limited to 'lld/unittests/DriverTests/WinLinkDriverTest.cpp')
-rw-r--r--lld/unittests/DriverTests/WinLinkDriverTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
index 011ca414ff8..2568da8e819 100644
--- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp
+++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
@@ -183,6 +183,11 @@ TEST_F(WinLinkParserTest, ExportWithOptions) {
EXPECT_TRUE(exports[1].isData);
}
+TEST_F(WinLinkParserTest, ExportDuplicates) {
+ EXPECT_FALSE(
+ parse("link.exe", "/export:foo,@1", "/export:bar,@1", "a.out", nullptr));
+}
+
TEST_F(WinLinkParserTest, ExportInvalid1) {
EXPECT_FALSE(parse("link.exe", "/export:foo,@0", "a.out", nullptr));
}
OpenPOWER on IntegriCloud