diff options
Diffstat (limited to 'clang/test/CodeGen')
| -rw-r--r-- | clang/test/CodeGen/switch-dce.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGen/switch-dce.c b/clang/test/CodeGen/switch-dce.c index a03c4001d3d..07a5eba2360 100644 --- a/clang/test/CodeGen/switch-dce.c +++ b/clang/test/CodeGen/switch-dce.c @@ -216,3 +216,18 @@ void test12() { } } + +// rdar://9289524 - Check that the empty cases don't produce an empty block. +// CHECK: @test13 +// CHECK: switch +// CHECK: i32 42, label %sw.epilog +// CHECK: i32 11, label %sw.epilog +// CHECK: sw.epilog: +// CHECK: ret void +void test13(int x) { + switch (x) { + case 42: break; // No empty block please. + case 11: break; // No empty block please. + default: test13(42); break; + } +} |

