2022-04-07 18:03:55 +08:00
|
|
|
// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.13.0 -std=c++1z -fobjc-arc -fobjc-exceptions -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s
|
2018-09-07 10:38:01 +08:00
|
|
|
|
|
|
|
// CHECK: %[[V0:.*]] = type opaque
|
|
|
|
// CHECK: %[[STRUCT_CLASS1:.*]] = type { %[[V0]]* }
|
|
|
|
|
|
|
|
@interface Class0;
|
|
|
|
@end
|
|
|
|
|
|
|
|
struct Class1 {
|
|
|
|
Class0 *f;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Container {
|
|
|
|
Class1 a;
|
|
|
|
bool b;
|
|
|
|
};
|
|
|
|
|
|
|
|
bool getBool() {
|
2020-07-16 05:47:45 +08:00
|
|
|
extern void mayThrow();
|
|
|
|
mayThrow();
|
2018-09-07 10:38:01 +08:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
Class0 *g;
|
|
|
|
|
|
|
|
// CHECK: define {{.*}} @_Z4testv()
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: invoke noundef zeroext i1 @_Z7getBoolv()
|
2018-09-07 10:38:01 +08:00
|
|
|
// CHECK: landingpad { i8*, i32 }
|
2020-11-17 07:04:55 +08:00
|
|
|
// CHECK: call void @_ZN6Class1D1Ev(%[[STRUCT_CLASS1]]* {{[^,]*}} %{{.*}})
|
2018-09-07 10:38:01 +08:00
|
|
|
// CHECK: br label
|
|
|
|
|
|
|
|
// CHECK: define linkonce_odr void @_ZN6Class1D1Ev(
|
|
|
|
|
|
|
|
Container test() {
|
|
|
|
return {{g}, getBool()};
|
|
|
|
}
|