diff options
Diffstat (limited to 'lld/unittests/DriverTests/DarwinLdDriverTest.cpp')
| -rw-r--r-- | lld/unittests/DriverTests/DarwinLdDriverTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp index d9b6764e01c..6c8799e089a 100644 --- a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp +++ b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp @@ -222,4 +222,13 @@ TEST_F(DarwinLdParserTest, deadStrippableDylibInvalidType) { EXPECT_FALSE(parse("ld", "-mark_dead_strippable_dylib", "a.o", nullptr)); } +TEST_F(DarwinLdParserTest, llvmOptions) { + EXPECT_TRUE(parse("ld", "-mllvm", "-debug-only", "-mllvm", "foo", "a.o", nullptr)); + const std::vector<const char *> &options = _context.llvmOptions(); + EXPECT_EQ(options.size(), 2UL); + EXPECT_EQ(strcmp(options[0],"-debug-only"), 0); + EXPECT_EQ(strcmp(options[1],"foo"), 0); +} + + } // end anonymous namespace |

