Daniel Dunbar | eab8078 | 2011-04-26 19:43:00 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm \ |
John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 2 | // RUN: -fexceptions -fobjc-exceptions \ |
Daniel Dunbar | eab8078 | 2011-04-26 19:43:00 +0000 | [diff] [blame] | 3 | // RUN: -o %t %s |
| 4 | // RUN: FileCheck < %t %s |
| 5 | // |
| 6 | // <rdar://problem/7471679> [irgen] [eh] Exception code built with clang (x86_64) crashes |
| 7 | |
| 8 | // Check that we don't emit unnecessary personality function references. |
| 9 | struct t0_A { t0_A(); }; |
| 10 | struct t0_B { t0_A a; }; |
| 11 | |
| 12 | // CHECK: define {{.*}} @_Z2t0v(){{.*}} { |
| 13 | // CHECK-NOT: objc_personality |
| 14 | // CHECK: } |
| 15 | t0_B& t0() { |
| 16 | static t0_B x; |
| 17 | return x; |
| 18 | } |