xref: /llvm-project/clang/test/CodeGenObjCXX/arc-list-init-destruct.mm (revision 08be7a429551cc995c939b357f709b878bfaf322)
1// RUN: %clang_cc1 -triple x86_64-apple-macosx10.13.0 -std=c++1z -fobjc-arc -fobjc-exceptions -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s
2
3// CHECK: %[[STRUCT_CLASS1:.*]] = type { ptr }
4
5@interface Class0;
6@end
7
8struct Class1 {
9  Class0 *f;
10};
11
12struct Container {
13  Class1 a;
14  bool b;
15};
16
17bool getBool() {
18  extern void mayThrow();
19  mayThrow();
20  return false;
21}
22
23Class0 *g;
24
25// CHECK: define {{.*}} @_Z4testv()
26// CHECK: invoke noundef zeroext i1 @_Z7getBoolv()
27// CHECK: landingpad { ptr, i32 }
28// CHECK: call void @_ZN6Class1D1Ev(ptr {{[^,]*}} %{{.*}})
29// CHECK: br label
30
31// CHECK: define linkonce_odr void @_ZN6Class1D1Ev(
32
33Container test() {
34  return {{g}, getBool()};
35}
36