aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Driver/ToolChainTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Driver/ToolChainTest.cpp')
-rw-r--r--clang/unittests/Driver/ToolChainTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/unittests/Driver/ToolChainTest.cpp b/clang/unittests/Driver/ToolChainTest.cpp
index 4ddeada..8d3853a 100644
--- a/clang/unittests/Driver/ToolChainTest.cpp
+++ b/clang/unittests/Driver/ToolChainTest.cpp
@@ -367,6 +367,16 @@ TEST(ToolChainTest, PostCallback) {
EXPECT_TRUE(CallbackHasCalled);
}
+TEST(CompilerInvocation, SplitSwarfSingleCrash) {
+ static constexpr const char *Args[] = {
+ "clang", "--target=arm-linux-gnueabi",
+ "-gdwarf-4", "-gsplit-dwarf=single",
+ "-c", "foo.cpp"};
+ CreateInvocationOptions CIOpts;
+ std::unique_ptr<CompilerInvocation> CI = createInvocation(Args, CIOpts);
+ EXPECT_TRUE(CI); // no-crash
+}
+
TEST(GetDriverMode, PrefersLastDriverMode) {
static constexpr const char *Args[] = {"clang-cl", "--driver-mode=foo",
"--driver-mode=bar", "foo.cpp"};