xref: /aosp_15_r20/external/clang/test/CodeGenObjC/simplify-exceptions.mm (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm \
2*67e74705SXin Li// RUN:   -fexceptions -fobjc-exceptions \
3*67e74705SXin Li// RUN:   -o %t %s
4*67e74705SXin Li// RUN: FileCheck < %t %s
5*67e74705SXin Li//
6*67e74705SXin Li// <rdar://problem/7471679> [irgen] [eh] Exception code built with clang (x86_64) crashes
7*67e74705SXin Li
8*67e74705SXin Li// Check that we don't emit unnecessary personality function references.
9*67e74705SXin Listruct t0_A { t0_A(); };
10*67e74705SXin Listruct t0_B { t0_A a; };
11*67e74705SXin Li
12*67e74705SXin Li// CHECK: define {{.*}} @_Z2t0v(){{.*}} {
13*67e74705SXin Li// CHECK-NOT: objc_personality
14*67e74705SXin Li// CHECK: }
15*67e74705SXin Lit0_B& t0() {
16*67e74705SXin Li static t0_B x;
17*67e74705SXin Li return x;
18*67e74705SXin Li}
19