2022-04-07 18:03:55 +08:00
|
|
|
// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-ios11 -std=c++11 -fobjc-arc -fobjc-weak -fobjc-runtime-has-weak -emit-llvm -o - %s | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-ios11 -std=c++11 -fobjc-arc -fobjc-weak -fobjc-runtime-has-weak -fclang-abi-compat=4.0 -emit-llvm -o - %s | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-ios11 -std=c++11 -fobjc-arc -fobjc-weak -fobjc-runtime-has-weak -emit-llvm -o - -DTRIVIALABI %s | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-ios11 -std=c++11 -fobjc-arc -fobjc-weak -fobjc-runtime-has-weak -fclang-abi-compat=4.0 -emit-llvm -o - -DTRIVIALABI %s | FileCheck %s
|
2018-03-29 05:13:14 +08:00
|
|
|
|
|
|
|
// Check that structs consisting solely of __strong or __weak pointer fields are
|
|
|
|
// destructed in the callee function and structs consisting solely of __strong
|
|
|
|
// pointer fields are passed directly.
|
2018-02-06 04:23:22 +08:00
|
|
|
|
|
|
|
// CHECK: %[[STRUCT_STRONGWEAK:.*]] = type { i8*, i8* }
|
2018-04-10 06:48:22 +08:00
|
|
|
// CHECK: %[[STRUCT_CONTAINSSTRONGWEAK:.*]] = type { %[[STRUCT_STRONGWEAK]] }
|
|
|
|
// CHECK: %[[STRUCT_DERIVEDSTRONGWEAK:.*]] = type { %[[STRUCT_STRONGWEAK]] }
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: %[[STRUCT_STRONG:.*]] = type { i8* }
|
|
|
|
// CHECK: %[[STRUCT_S:.*]] = type { i8* }
|
2018-03-29 05:13:14 +08:00
|
|
|
// CHECK: %[[STRUCT_CONTAINSNONTRIVIAL:.*]] = type { %{{.*}}, i8* }
|
2020-12-29 03:52:27 +08:00
|
|
|
// CHECK: %[[STRUCT_NONTRIVIAL:.*]] = type { i32* }
|
2018-02-06 04:23:22 +08:00
|
|
|
|
2018-03-29 05:13:14 +08:00
|
|
|
#ifdef TRIVIALABI
|
2018-02-06 04:23:22 +08:00
|
|
|
struct __attribute__((trivial_abi)) StrongWeak {
|
2018-03-29 05:13:14 +08:00
|
|
|
#else
|
|
|
|
struct StrongWeak {
|
|
|
|
#endif
|
2018-02-06 04:23:22 +08:00
|
|
|
id fstrong;
|
|
|
|
__weak id fweak;
|
|
|
|
};
|
|
|
|
|
2018-04-10 06:48:22 +08:00
|
|
|
#ifdef TRIVIALABI
|
|
|
|
struct __attribute__((trivial_abi)) ContainsStrongWeak {
|
|
|
|
#else
|
|
|
|
struct ContainsStrongWeak {
|
|
|
|
#endif
|
|
|
|
StrongWeak sw;
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef TRIVIALABI
|
|
|
|
struct __attribute__((trivial_abi)) DerivedStrongWeak : StrongWeak {
|
|
|
|
#else
|
|
|
|
struct DerivedStrongWeak : StrongWeak {
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2018-03-29 05:13:14 +08:00
|
|
|
#ifdef TRIVIALABI
|
2018-02-06 04:23:22 +08:00
|
|
|
struct __attribute__((trivial_abi)) Strong {
|
2018-03-29 05:13:14 +08:00
|
|
|
#else
|
|
|
|
struct Strong {
|
|
|
|
#endif
|
2018-02-06 04:23:22 +08:00
|
|
|
id fstrong;
|
|
|
|
};
|
|
|
|
|
|
|
|
template<class T>
|
2018-03-29 05:13:14 +08:00
|
|
|
#ifdef TRIVIALABI
|
2018-02-06 04:23:22 +08:00
|
|
|
struct __attribute__((trivial_abi)) S {
|
2018-03-29 05:13:14 +08:00
|
|
|
#else
|
|
|
|
struct S {
|
|
|
|
#endif
|
2018-02-06 04:23:22 +08:00
|
|
|
T a;
|
|
|
|
};
|
|
|
|
|
2018-03-29 05:13:14 +08:00
|
|
|
struct NonTrivial {
|
|
|
|
NonTrivial();
|
|
|
|
NonTrivial(const NonTrivial &);
|
|
|
|
~NonTrivial();
|
|
|
|
int *a;
|
|
|
|
};
|
|
|
|
|
|
|
|
// This struct is not passed directly nor destructed in the callee because f0
|
|
|
|
// has type NonTrivial.
|
|
|
|
struct ContainsNonTrivial {
|
|
|
|
NonTrivial f0;
|
|
|
|
id f1;
|
|
|
|
};
|
|
|
|
|
2020-12-29 03:52:27 +08:00
|
|
|
@interface C
|
|
|
|
- (void)passStrong:(Strong)a;
|
|
|
|
- (void)passStrongWeak:(StrongWeak)a;
|
|
|
|
- (void)passNonTrivial:(NonTrivial)a;
|
|
|
|
@end
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z19testParamStrongWeak10StrongWeak(%[[STRUCT_STRONGWEAK]]* noundef %{{.*}})
|
|
|
|
// CHECK: call noundef %struct.StrongWeak* @_ZN10StrongWeakD1Ev(
|
2018-03-29 05:13:14 +08:00
|
|
|
// CHECK-NEXT: ret void
|
2018-02-06 04:23:22 +08:00
|
|
|
|
|
|
|
void testParamStrongWeak(StrongWeak a) {
|
|
|
|
}
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z18testCallStrongWeakP10StrongWeak(%[[STRUCT_STRONGWEAK]]* noundef %[[A:.*]])
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: %[[A_ADDR:.*]] = alloca %[[STRUCT_STRONGWEAK]]*, align 8
|
|
|
|
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_STRONGWEAK]], align 8
|
|
|
|
// CHECK: store %[[STRUCT_STRONGWEAK]]* %[[A]], %[[STRUCT_STRONGWEAK]]** %[[A_ADDR]], align 8
|
|
|
|
// CHECK: %[[V0:.*]] = load %[[STRUCT_STRONGWEAK]]*, %[[STRUCT_STRONGWEAK]]** %[[A_ADDR]], align 8
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_STRONGWEAK]]* @_ZN10StrongWeakC1ERKS_(%[[STRUCT_STRONGWEAK]]* {{[^,]*}} %[[AGG_TMP]], %[[STRUCT_STRONGWEAK]]* noundef nonnull align 8 dereferenceable(16) %[[V0]])
|
|
|
|
// CHECK: call void @_Z19testParamStrongWeak10StrongWeak(%[[STRUCT_STRONGWEAK]]* noundef %[[AGG_TMP]])
|
2018-03-29 05:13:14 +08:00
|
|
|
// CHECK-NOT: call
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: ret void
|
|
|
|
|
|
|
|
void testCallStrongWeak(StrongWeak *a) {
|
|
|
|
testParamStrongWeak(*a);
|
|
|
|
}
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z20testReturnStrongWeakP10StrongWeak(%[[STRUCT_STRONGWEAK:.*]]* noalias sret(%[[STRUCT_STRONGWEAK]]) align 8 %[[AGG_RESULT:.*]], %[[STRUCT_STRONGWEAK]]* noundef %[[A:.*]])
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: %[[A_ADDR:.*]] = alloca %[[STRUCT_STRONGWEAK]]*, align 8
|
|
|
|
// CHECK: store %[[STRUCT_STRONGWEAK]]* %[[A]], %[[STRUCT_STRONGWEAK]]** %[[A_ADDR]], align 8
|
|
|
|
// CHECK: %[[V0:.*]] = load %[[STRUCT_STRONGWEAK]]*, %[[STRUCT_STRONGWEAK]]** %[[A_ADDR]], align 8
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_STRONGWEAK]]* @_ZN10StrongWeakC1ERKS_(%[[STRUCT_STRONGWEAK]]* {{[^,]*}} %[[AGG_RESULT]], %[[STRUCT_STRONGWEAK]]* noundef nonnull align 8 dereferenceable(16) %[[V0]])
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: ret void
|
|
|
|
|
|
|
|
StrongWeak testReturnStrongWeak(StrongWeak *a) {
|
|
|
|
return *a;
|
|
|
|
}
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z27testParamContainsStrongWeak18ContainsStrongWeak(%[[STRUCT_CONTAINSSTRONGWEAK]]* noundef %[[A:.*]])
|
|
|
|
// CHECK: call noundef %[[STRUCT_CONTAINSSTRONGWEAK]]* @_ZN18ContainsStrongWeakD1Ev(%[[STRUCT_CONTAINSSTRONGWEAK]]* {{[^,]*}} %[[A]])
|
2018-04-10 06:48:22 +08:00
|
|
|
|
|
|
|
void testParamContainsStrongWeak(ContainsStrongWeak a) {
|
|
|
|
}
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z26testParamDerivedStrongWeak17DerivedStrongWeak(%[[STRUCT_DERIVEDSTRONGWEAK]]* noundef %[[A:.*]])
|
|
|
|
// CHECK: call noundef %[[STRUCT_DERIVEDSTRONGWEAK]]* @_ZN17DerivedStrongWeakD1Ev(%[[STRUCT_DERIVEDSTRONGWEAK]]* {{[^,]*}} %[[A]])
|
2018-04-10 06:48:22 +08:00
|
|
|
|
|
|
|
void testParamDerivedStrongWeak(DerivedStrongWeak a) {
|
|
|
|
}
|
|
|
|
|
2020-12-31 12:45:56 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z15testParamStrong6Strong(i64 %[[A_COERCE:.*]])
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: %[[A:.*]] = alloca %[[STRUCT_STRONG]], align 8
|
|
|
|
// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_STRONG]], %[[STRUCT_STRONG]]* %[[A]], i32 0, i32 0
|
|
|
|
// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[A_COERCE]] to i8*
|
|
|
|
// CHECK: store i8* %[[COERCE_VAL_IP]], i8** %[[COERCE_DIVE]], align 8
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_STRONG]]* @_ZN6StrongD1Ev(%[[STRUCT_STRONG]]* {{[^,]*}} %[[A]])
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: ret void
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define linkonce_odr noundef %[[STRUCT_STRONG]]* @_ZN6StrongD1Ev(
|
2018-02-06 04:23:22 +08:00
|
|
|
|
|
|
|
void testParamStrong(Strong a) {
|
|
|
|
}
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z14testCallStrongP6Strong(%[[STRUCT_STRONG]]* noundef %[[A:.*]])
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: %[[A_ADDR:.*]] = alloca %[[STRUCT_STRONG]]*, align 8
|
|
|
|
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_STRONG]], align 8
|
|
|
|
// CHECK: store %[[STRUCT_STRONG]]* %[[A]], %[[STRUCT_STRONG]]** %[[A_ADDR]], align 8
|
|
|
|
// CHECK: %[[V0:.*]] = load %[[STRUCT_STRONG]]*, %[[STRUCT_STRONG]]** %[[A_ADDR]], align 8
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_STRONG]]* @_ZN6StrongC1ERKS_(%[[STRUCT_STRONG]]* {{[^,]*}} %[[AGG_TMP]], %[[STRUCT_STRONG]]* noundef nonnull align 8 dereferenceable(8) %[[V0]])
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_STRONG]], %[[STRUCT_STRONG]]* %[[AGG_TMP]], i32 0, i32 0
|
|
|
|
// CHECK: %[[V1:.*]] = load i8*, i8** %[[COERCE_DIVE]], align 8
|
|
|
|
// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint i8* %[[V1]] to i64
|
|
|
|
// CHECK: call void @_Z15testParamStrong6Strong(i64 %[[COERCE_VAL_PI]])
|
|
|
|
// CHECK: ret void
|
|
|
|
|
|
|
|
void testCallStrong(Strong *a) {
|
|
|
|
testParamStrong(*a);
|
|
|
|
}
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define{{.*}} i64 @_Z16testReturnStrongP6Strong(%[[STRUCT_STRONG]]* noundef %[[A:.*]])
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: %[[RETVAL:.*]] = alloca %[[STRUCT_STRONG]], align 8
|
|
|
|
// CHECK: %[[A_ADDR:.*]] = alloca %[[STRUCT_STRONG]]*, align 8
|
|
|
|
// CHECK: store %[[STRUCT_STRONG]]* %[[A]], %[[STRUCT_STRONG]]** %[[A_ADDR]], align 8
|
|
|
|
// CHECK: %[[V0:.*]] = load %[[STRUCT_STRONG]]*, %[[STRUCT_STRONG]]** %[[A_ADDR]], align 8
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: %[[CALL:.*]] = call noundef %[[STRUCT_STRONG]]* @_ZN6StrongC1ERKS_(%[[STRUCT_STRONG]]* {{[^,]*}} %[[RETVAL]], %[[STRUCT_STRONG]]* noundef nonnull align 8 dereferenceable(8) %[[V0]])
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_STRONG]], %[[STRUCT_STRONG]]* %[[RETVAL]], i32 0, i32 0
|
|
|
|
// CHECK: %[[V1:.*]] = load i8*, i8** %[[COERCE_DIVE]], align 8
|
|
|
|
// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint i8* %[[V1]] to i64
|
|
|
|
// CHECK: ret i64 %[[COERCE_VAL_PI]]
|
|
|
|
|
|
|
|
Strong testReturnStrong(Strong *a) {
|
|
|
|
return *a;
|
|
|
|
}
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z21testParamWeakTemplate1SIU6__weakP11objc_objectE(%[[STRUCT_S]]* noundef %{{.*}})
|
|
|
|
// CHECK: call noundef %struct.S* @_ZN1SIU6__weakP11objc_objectED1Ev(
|
2018-03-29 05:13:14 +08:00
|
|
|
// CHECK-NEXT: ret void
|
|
|
|
|
|
|
|
void testParamWeakTemplate(S<__weak id> a) {
|
|
|
|
}
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z27testParamContainsNonTrivial18ContainsNonTrivial(%[[STRUCT_CONTAINSNONTRIVIAL]]* noundef %{{.*}})
|
2018-02-06 04:23:22 +08:00
|
|
|
// CHECK-NOT: call
|
|
|
|
// CHECK: ret void
|
|
|
|
|
2018-03-29 05:13:14 +08:00
|
|
|
void testParamContainsNonTrivial(ContainsNonTrivial a) {
|
|
|
|
}
|
|
|
|
|
2020-12-31 12:45:56 +08:00
|
|
|
// CHECK: define{{.*}} void @_Z26testCallContainsNonTrivialP18ContainsNonTrivial(
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: call void @_Z27testParamContainsNonTrivial18ContainsNonTrivial(%[[STRUCT_CONTAINSNONTRIVIAL]]* noundef %{{.*}})
|
|
|
|
// CHECK: call noundef %struct.ContainsNonTrivial* @_ZN18ContainsNonTrivialD1Ev(%[[STRUCT_CONTAINSNONTRIVIAL]]* {{[^,]*}} %{{.*}})
|
2018-03-29 05:13:14 +08:00
|
|
|
|
|
|
|
void testCallContainsNonTrivial(ContainsNonTrivial *a) {
|
|
|
|
testParamContainsNonTrivial(*a);
|
2018-02-06 04:23:22 +08:00
|
|
|
}
|
2020-07-11 08:24:12 +08:00
|
|
|
|
|
|
|
namespace testThunk {
|
|
|
|
|
2020-12-31 12:45:56 +08:00
|
|
|
// CHECK-LABEL: define{{.*}} i64 @_ZThn8_N9testThunk2D02m0Ev(
|
2020-07-11 08:24:12 +08:00
|
|
|
// CHECK: %[[RETVAL:.*]] = alloca %[[STRUCT_STRONG]], align 8
|
|
|
|
// CHECK: %[[CALL:.*]] = tail call i64 @_ZN9testThunk2D02m0Ev(
|
|
|
|
// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_STRONG]], %[[STRUCT_STRONG]]* %[[RETVAL]], i32 0, i32 0
|
|
|
|
// CHECK: %[[COERCE_VAL_IP:.*]] = inttoptr i64 %[[CALL]] to i8*
|
|
|
|
// CHECK: store i8* %[[COERCE_VAL_IP]], i8** %[[COERCE_DIVE]], align 8
|
|
|
|
// CHECK: %[[COERCE_DIVE2:.*]] = getelementptr inbounds %[[STRUCT_STRONG]], %[[STRUCT_STRONG]]* %[[RETVAL]], i32 0, i32 0
|
|
|
|
// CHECK: %[[V3:.*]] = load i8*, i8** %[[COERCE_DIVE2]], align 8
|
|
|
|
// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint i8* %[[V3]] to i64
|
|
|
|
// CHECK: ret i64 %[[COERCE_VAL_PI]]
|
|
|
|
|
|
|
|
struct B0 {
|
|
|
|
virtual Strong m0();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct B1 {
|
|
|
|
virtual Strong m0();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct D0 : B0, B1 {
|
|
|
|
Strong m0() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
Strong D0::m0() { return {}; }
|
|
|
|
|
|
|
|
}
|
2020-12-29 03:52:27 +08:00
|
|
|
|
|
|
|
namespace testNullReceiver {
|
|
|
|
|
2020-12-31 12:45:56 +08:00
|
|
|
// CHECK-LABEL: define{{.*}} void @_ZN16testNullReceiver5test0EP1C(
|
2020-12-29 03:52:27 +08:00
|
|
|
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_STRONG]], align 8
|
|
|
|
// CHECK: br i1
|
|
|
|
|
|
|
|
// CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_STRONG]], %[[STRUCT_STRONG]]* %[[AGG_TMP]], i32 0, i32 0
|
|
|
|
// CHECK: %[[V7:.*]] = load i8*, i8** %[[COERCE_DIVE]], align 8
|
|
|
|
// CHECK: %[[COERCE_VAL_PI:.*]] = ptrtoint i8* %[[V7]] to i64
|
|
|
|
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i64)*)({{.*}}, i64 %[[COERCE_VAL_PI]])
|
|
|
|
// CHECK: br
|
|
|
|
|
2022-01-20 21:45:19 +08:00
|
|
|
// CHECK: %[[CALL1:.*]] = call noundef %[[STRUCT_STRONG]]* @_ZN6StrongD1Ev(%[[STRUCT_STRONG]]* noundef nonnull align 8 dereferenceable(8) %[[AGG_TMP]])
|
2020-12-29 03:52:27 +08:00
|
|
|
// CHECK: br
|
|
|
|
|
|
|
|
void test0(C *c) {
|
|
|
|
[c passStrong:Strong()];
|
|
|
|
}
|
|
|
|
|
2020-12-31 12:45:56 +08:00
|
|
|
// CHECK-LABEL: define{{.*}} void @_ZN16testNullReceiver5test1EP1C(
|
2020-12-29 03:52:27 +08:00
|
|
|
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_STRONGWEAK]], align 8
|
|
|
|
// CHECK: br i1
|
|
|
|
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void ({{.*}}, %[[STRUCT_STRONGWEAK]]* noundef %[[AGG_TMP]])
|
2020-12-29 03:52:27 +08:00
|
|
|
// CHECK: br
|
|
|
|
|
2022-01-20 21:45:19 +08:00
|
|
|
// CHECK: %[[CALL1:.*]] = call noundef %[[STRUCT_STRONGWEAK]]* @_ZN10StrongWeakD1Ev(%[[STRUCT_STRONGWEAK]]* noundef nonnull align 8 dereferenceable(16) %[[AGG_TMP]])
|
2020-12-29 03:52:27 +08:00
|
|
|
// CHECK: br
|
|
|
|
|
|
|
|
void test1(C *c) {
|
|
|
|
[c passStrongWeak:StrongWeak()];
|
|
|
|
}
|
|
|
|
|
|
|
|
// No null check needed.
|
|
|
|
|
2020-12-31 12:45:56 +08:00
|
|
|
// CHECK-LABEL: define{{.*}} void @_ZN16testNullReceiver5test2EP1C(
|
2020-12-29 03:52:27 +08:00
|
|
|
// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_NONTRIVIAL]], align 8
|
2022-01-16 17:53:11 +08:00
|
|
|
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %[[STRUCT_NONTRIVIAL]]*)*)({{.*}}, %[[STRUCT_NONTRIVIAL]]* noundef %[[AGG_TMP]])
|
2022-01-20 21:45:19 +08:00
|
|
|
// CHECK-NEXT: call noundef %[[STRUCT_NONTRIVIAL]]* @_ZN10NonTrivialD1Ev(%[[STRUCT_NONTRIVIAL]]* noundef nonnull align 8 dereferenceable(8) %[[AGG_TMP]])
|
2020-12-29 03:52:27 +08:00
|
|
|
|
|
|
|
void test2(C *c) {
|
|
|
|
[c passNonTrivial:NonTrivial()];
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|