summaryrefslogtreecommitdiffstats
path: root/lld/unittests/DriverTests/WinLinkDriverTest.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-09-24 00:21:45 +0000
committerRui Ueyama <ruiu@google.com>2014-09-24 00:21:45 +0000
commit251d9a34e20bb4b7f7724ddedbf8265c7abb68a9 (patch)
tree9eeebe08ccd4733f37f2787187de924fefcd5452 /lld/unittests/DriverTests/WinLinkDriverTest.cpp
parent75c0127bb3916e9f76bd0f003aebc22d2d4ac93a (diff)
downloadbcm5719-llvm-251d9a34e20bb4b7f7724ddedbf8265c7abb68a9.tar.gz
bcm5719-llvm-251d9a34e20bb4b7f7724ddedbf8265c7abb68a9.zip
[PECOFF] Simplify /machine option handling
/machine:ebc was previously recognized but rejected. Unknown architecture names were handled differently but eventually rejected too. We don't need to distinguish them. llvm-svn: 218344
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 62835b6c8f3..ed87f1286bc 100644
--- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp
+++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
@@ -221,6 +221,11 @@ TEST_F(WinLinkParserTest, MachineArm) {
EXPECT_EQ(llvm::COFF::IMAGE_FILE_MACHINE_ARMNT, _context.getMachineType());
}
+TEST_F(WinLinkParserTest, MachineUnknown) {
+ EXPECT_FALSE(parse("link.exe", "/machine:nosucharch", "a.obj", nullptr));
+ EXPECT_EQ("error: unknown machine type: nosucharch\n", errorMessage());
+}
+
TEST_F(WinLinkParserTest, MajorImageVersion) {
EXPECT_TRUE(parse("link.exe", "/version:7", "foo.o", nullptr));
EXPECT_EQ(7, _context.getImageVersion().majorVersion);
OpenPOWER on IntegriCloud