1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -std=c++03 -fexceptions -fcxx-exceptions -o - %s | FileCheck %s 2f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple i386-apple-darwin10 -emit-llvm -std=c++03 -o - %s | FileCheck --check-prefix=CHECK-2 %s 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc struct POD { 5f4a2713aSLionel Sambuc int w, x, y, z; 6f4a2713aSLionel Sambuc }; 7f4a2713aSLionel Sambuc 8f4a2713aSLionel Sambuc struct PODLike { 9f4a2713aSLionel Sambuc int w, x, y, z; 10f4a2713aSLionel Sambuc PODLike(); 11f4a2713aSLionel Sambuc ~PODLike(); 12f4a2713aSLionel Sambuc }; 13f4a2713aSLionel Sambuc 14f4a2713aSLionel Sambuc struct NonPOD { 15f4a2713aSLionel Sambuc NonPOD(); 16f4a2713aSLionel Sambuc NonPOD(const NonPOD&); 17f4a2713aSLionel Sambuc NonPOD& operator=(const NonPOD&); 18f4a2713aSLionel Sambuc }; 19f4a2713aSLionel Sambuc 20f4a2713aSLionel Sambuc struct Basic { 21f4a2713aSLionel Sambuc int a, b, c, d; 22f4a2713aSLionel Sambuc NonPOD np; 23f4a2713aSLionel Sambuc int w, x, y, z; 24f4a2713aSLionel Sambuc }; 25f4a2713aSLionel Sambuc 26f4a2713aSLionel Sambuc struct PODMember { 27f4a2713aSLionel Sambuc int a, b, c, d; 28f4a2713aSLionel Sambuc POD p; 29f4a2713aSLionel Sambuc NonPOD np; 30f4a2713aSLionel Sambuc int w, x, y, z; 31f4a2713aSLionel Sambuc }; 32f4a2713aSLionel Sambuc 33f4a2713aSLionel Sambuc struct PODLikeMember { 34f4a2713aSLionel Sambuc int a, b, c, d; 35f4a2713aSLionel Sambuc PODLike pl; 36f4a2713aSLionel Sambuc NonPOD np; 37f4a2713aSLionel Sambuc int w, x, y, z; 38f4a2713aSLionel Sambuc }; 39f4a2713aSLionel Sambuc 40f4a2713aSLionel Sambuc struct ArrayMember { 41f4a2713aSLionel Sambuc int a, b, c, d; 42f4a2713aSLionel Sambuc int e[12]; 43f4a2713aSLionel Sambuc NonPOD np; 44f4a2713aSLionel Sambuc int f[12]; 45f4a2713aSLionel Sambuc int w, x, y, z; 46f4a2713aSLionel Sambuc }; 47f4a2713aSLionel Sambuc 48f4a2713aSLionel Sambuc struct VolatileMember { 49f4a2713aSLionel Sambuc int a, b, c, d; 50f4a2713aSLionel Sambuc volatile int v; 51f4a2713aSLionel Sambuc NonPOD np; 52f4a2713aSLionel Sambuc int w, x, y, z; 53f4a2713aSLionel Sambuc }; 54f4a2713aSLionel Sambuc 55f4a2713aSLionel Sambuc struct BitfieldMember { 56f4a2713aSLionel Sambuc int a, b, c, d; 57f4a2713aSLionel Sambuc NonPOD np; 58f4a2713aSLionel Sambuc int w : 6; 59f4a2713aSLionel Sambuc int x : 6; 60f4a2713aSLionel Sambuc int y : 6; 61f4a2713aSLionel Sambuc int z : 6; 62f4a2713aSLionel Sambuc }; 63f4a2713aSLionel Sambuc 64f4a2713aSLionel Sambuc struct BitfieldMember2 { 65f4a2713aSLionel Sambuc unsigned a : 1; 66f4a2713aSLionel Sambuc unsigned b, c, d; 67f4a2713aSLionel Sambuc NonPOD np; 68f4a2713aSLionel Sambuc }; 69f4a2713aSLionel Sambuc 70*0a6a1f1dSLionel Sambuc struct BitfieldMember3 { 71*0a6a1f1dSLionel Sambuc virtual void f(); 72*0a6a1f1dSLionel Sambuc int : 8; 73*0a6a1f1dSLionel Sambuc int x : 1; 74*0a6a1f1dSLionel Sambuc int y; 75*0a6a1f1dSLionel Sambuc }; 76*0a6a1f1dSLionel Sambuc 77f4a2713aSLionel Sambuc struct InnerClassMember { 78f4a2713aSLionel Sambuc struct { 79f4a2713aSLionel Sambuc int a, b, c, d; 80f4a2713aSLionel Sambuc } a; 81f4a2713aSLionel Sambuc int b, c, d, e; 82f4a2713aSLionel Sambuc NonPOD np; 83f4a2713aSLionel Sambuc int w, x, y, z; 84f4a2713aSLionel Sambuc }; 85f4a2713aSLionel Sambuc 86f4a2713aSLionel Sambuc struct ReferenceMember { ReferenceMemberReferenceMember87f4a2713aSLionel Sambuc ReferenceMember(int &a, int &b, int &c, int &d) 88f4a2713aSLionel Sambuc : a(a), b(b), c(c), d(d) {} 89f4a2713aSLionel Sambuc int &a; 90f4a2713aSLionel Sambuc int &b; 91f4a2713aSLionel Sambuc NonPOD np; 92f4a2713aSLionel Sambuc int &c; 93f4a2713aSLionel Sambuc int &d; 94f4a2713aSLionel Sambuc }; 95f4a2713aSLionel Sambuc 96f4a2713aSLionel Sambuc struct __attribute__((packed)) PackedMembers { 97f4a2713aSLionel Sambuc char c; 98f4a2713aSLionel Sambuc NonPOD np; 99f4a2713aSLionel Sambuc int w, x, y, z; 100f4a2713aSLionel Sambuc }; 101f4a2713aSLionel Sambuc 102f4a2713aSLionel Sambuc // COPY-ASSIGNMENT OPERATORS: 103f4a2713aSLionel Sambuc 104f4a2713aSLionel Sambuc // Assignment operators are output in the order they're encountered. 105f4a2713aSLionel Sambuc 106f4a2713aSLionel Sambuc #define CALL_AO(T) void callAO##T(T& a, const T& b) { a = b; } 107f4a2713aSLionel Sambuc 108f4a2713aSLionel Sambuc CALL_AO(Basic) 109f4a2713aSLionel Sambuc CALL_AO(PODMember) 110f4a2713aSLionel Sambuc CALL_AO(PODLikeMember) 111f4a2713aSLionel Sambuc CALL_AO(ArrayMember) 112f4a2713aSLionel Sambuc CALL_AO(VolatileMember) 113f4a2713aSLionel Sambuc CALL_AO(BitfieldMember) 114f4a2713aSLionel Sambuc CALL_AO(InnerClassMember) 115f4a2713aSLionel Sambuc CALL_AO(PackedMembers) 116f4a2713aSLionel Sambuc 117f4a2713aSLionel Sambuc // Basic copy-assignment: 118*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.Basic* @_ZN5BasicaSERKS_(%struct.Basic* %this, %struct.Basic* dereferenceable({{[0-9]+}})) 119f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 120*0a6a1f1dSLionel Sambuc // CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_ 121f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 122f4a2713aSLionel Sambuc // CHECK: ret %struct.Basic* 123f4a2713aSLionel Sambuc 124f4a2713aSLionel Sambuc // PODMember copy-assignment: 125*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.PODMember* @_ZN9PODMemberaSERKS_(%struct.PODMember* %this, %struct.PODMember* dereferenceable({{[0-9]+}})) 126f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}}) 127*0a6a1f1dSLionel Sambuc // CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_ 128f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 129f4a2713aSLionel Sambuc // CHECK: ret %struct.PODMember* 130f4a2713aSLionel Sambuc 131f4a2713aSLionel Sambuc // PODLikeMember copy-assignment: 132*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.PODLikeMember* @_ZN13PODLikeMemberaSERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* dereferenceable({{[0-9]+}})) 133f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}}) 134*0a6a1f1dSLionel Sambuc // CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_ 135f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 136f4a2713aSLionel Sambuc // CHECK: ret %struct.PODLikeMember* 137f4a2713aSLionel Sambuc 138f4a2713aSLionel Sambuc // ArrayMember copy-assignment: 139*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.ArrayMember* @_ZN11ArrayMemberaSERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* dereferenceable({{[0-9]+}})) 140f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}}) 141*0a6a1f1dSLionel Sambuc // CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_ 142f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}}) 143f4a2713aSLionel Sambuc // CHECK: ret %struct.ArrayMember* 144f4a2713aSLionel Sambuc 145f4a2713aSLionel Sambuc // VolatileMember copy-assignment: 146*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.VolatileMember* @_ZN14VolatileMemberaSERKS_(%struct.VolatileMember* %this, %struct.VolatileMember* dereferenceable({{[0-9]+}})) 147f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 148f4a2713aSLionel Sambuc // CHECK: load volatile i32* {{.*}}, align 4 149f4a2713aSLionel Sambuc // CHECK: store volatile i32 {{.*}}, align 4 150*0a6a1f1dSLionel Sambuc // CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_ 151f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 152f4a2713aSLionel Sambuc // CHECK: ret %struct.VolatileMember* 153f4a2713aSLionel Sambuc 154f4a2713aSLionel Sambuc // BitfieldMember copy-assignment: 155*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.BitfieldMember* @_ZN14BitfieldMemberaSERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* dereferenceable({{[0-9]+}})) 156f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 157*0a6a1f1dSLionel Sambuc // CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_ 158f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}}) 159f4a2713aSLionel Sambuc // CHECK: ret %struct.BitfieldMember* 160f4a2713aSLionel Sambuc 161f4a2713aSLionel Sambuc // InnerClass copy-assignment: 162*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.InnerClassMember* @_ZN16InnerClassMemberaSERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* dereferenceable({{[0-9]+}})) 163f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}}) 164*0a6a1f1dSLionel Sambuc // CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_ 165f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 166f4a2713aSLionel Sambuc // CHECK: ret %struct.InnerClassMember* 167f4a2713aSLionel Sambuc 168f4a2713aSLionel Sambuc // PackedMembers copy-assignment: 169*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.PackedMembers* @_ZN13PackedMembersaSERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* dereferenceable({{[0-9]+}})) 170*0a6a1f1dSLionel Sambuc // CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_ 171f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}}) 172f4a2713aSLionel Sambuc // CHECK: ret %struct.PackedMembers* 173f4a2713aSLionel Sambuc 174f4a2713aSLionel Sambuc // COPY-CONSTRUCTORS: 175f4a2713aSLionel Sambuc 176f4a2713aSLionel Sambuc // Clang outputs copy-constructors in the reverse of the order that 177f4a2713aSLionel Sambuc // copy-constructor calls are encountered. Add functions that call the copy 178f4a2713aSLionel Sambuc // constructors of the classes above in reverse order here. 179f4a2713aSLionel Sambuc 180f4a2713aSLionel Sambuc #define CALL_CC(T) T callCC##T(const T& b) { return b; } 181f4a2713aSLionel Sambuc 182f4a2713aSLionel Sambuc CALL_CC(PackedMembers) 183f4a2713aSLionel Sambuc CALL_CC(BitfieldMember2) 184*0a6a1f1dSLionel Sambuc CALL_CC(BitfieldMember3) 185f4a2713aSLionel Sambuc CALL_CC(ReferenceMember) 186f4a2713aSLionel Sambuc CALL_CC(InnerClassMember) 187f4a2713aSLionel Sambuc CALL_CC(BitfieldMember) 188f4a2713aSLionel Sambuc CALL_CC(VolatileMember) 189f4a2713aSLionel Sambuc CALL_CC(ArrayMember) 190f4a2713aSLionel Sambuc CALL_CC(PODLikeMember) 191f4a2713aSLionel Sambuc CALL_CC(PODMember) 192f4a2713aSLionel Sambuc CALL_CC(Basic) 193f4a2713aSLionel Sambuc 194f4a2713aSLionel Sambuc // Basic copy-constructor: 195*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* %this, %struct.Basic* dereferenceable({{[0-9]+}})) 196f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 197f4a2713aSLionel Sambuc // CHECK: call void @_ZN6NonPODC1ERKS_ 198f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 199f4a2713aSLionel Sambuc // CHECK: ret void 200f4a2713aSLionel Sambuc 201f4a2713aSLionel Sambuc // PODMember copy-constructor: 202*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* %this, %struct.PODMember* dereferenceable({{[0-9]+}})) 203f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}}) 204f4a2713aSLionel Sambuc // CHECK: call void @_ZN6NonPODC1ERKS_ 205f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 206f4a2713aSLionel Sambuc // CHECK: ret void 207f4a2713aSLionel Sambuc 208f4a2713aSLionel Sambuc // PODLikeMember copy-constructor: 209*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* dereferenceable({{[0-9]+}})) 210f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}}) 211f4a2713aSLionel Sambuc // CHECK: invoke void @_ZN6NonPODC1ERKS_ 212f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 213f4a2713aSLionel Sambuc // CHECK: ret void 214f4a2713aSLionel Sambuc // CHECK: landingpad 215f4a2713aSLionel Sambuc // CHECK: invoke void @_ZN7PODLikeD1Ev 216f4a2713aSLionel Sambuc 217f4a2713aSLionel Sambuc // ArrayMember copy-constructor: 218*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* dereferenceable({{[0-9]+}})) 219f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}}) 220f4a2713aSLionel Sambuc // CHECK: call void @_ZN6NonPODC1ERKS_ 221f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}}) 222f4a2713aSLionel Sambuc // CHECK: ret void 223f4a2713aSLionel Sambuc 224f4a2713aSLionel Sambuc // VolatileMember copy-constructor: 225*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(%struct.VolatileMember* %this, %struct.VolatileMember* dereferenceable({{[0-9]+}})) 226f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 227f4a2713aSLionel Sambuc // CHECK: load volatile i32* {{.*}}, align 4 228f4a2713aSLionel Sambuc // CHECK: store volatile i32 {{.*}}, align 4 229f4a2713aSLionel Sambuc // CHECK: call void @_ZN6NonPODC1ERKS_ 230f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 231f4a2713aSLionel Sambuc // CHECK: ret void 232f4a2713aSLionel Sambuc 233f4a2713aSLionel Sambuc // BitfieldMember copy-constructor: 234*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* dereferenceable({{[0-9]+}})) 235f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 236f4a2713aSLionel Sambuc // CHECK: call void @_ZN6NonPODC1ERKS_ 237f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}}) 238f4a2713aSLionel Sambuc // CHECK: ret void 239f4a2713aSLionel Sambuc 240f4a2713aSLionel Sambuc // InnerClass copy-constructor: 241*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* dereferenceable({{[0-9]+}})) 242f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}}) 243f4a2713aSLionel Sambuc // CHECK: call void @_ZN6NonPODC1ERKS_ 244f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}}) 245f4a2713aSLionel Sambuc // CHECK: ret void 246f4a2713aSLionel Sambuc 247f4a2713aSLionel Sambuc // ReferenceMember copy-constructor: 248*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* %this, %struct.ReferenceMember* dereferenceable({{[0-9]+}})) 249f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}}) 250f4a2713aSLionel Sambuc // CHECK: call void @_ZN6NonPODC1ERKS_ 251f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}}) 252f4a2713aSLionel Sambuc // CHECK: ret void 253f4a2713aSLionel Sambuc 254*0a6a1f1dSLionel Sambuc // BitfieldMember3 copy-constructor: 255*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN15BitfieldMember3C2ERKS_(%struct.BitfieldMember3* %this, %struct.BitfieldMember3* dereferenceable({{[0-9]+}})) 256*0a6a1f1dSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 8, i32 8, i1 false) 257*0a6a1f1dSLionel Sambuc // CHECK: ret void 258*0a6a1f1dSLionel Sambuc 259f4a2713aSLionel Sambuc // BitfieldMember2 copy-constructor: 260*0a6a1f1dSLionel Sambuc // CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* %this, %struct.BitfieldMember2* dereferenceable({{[0-9]+}})) 261f4a2713aSLionel Sambuc // CHECK-2: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4, i1 false) 262f4a2713aSLionel Sambuc // CHECK-2: call void @_ZN6NonPODC1ERKS_ 263f4a2713aSLionel Sambuc // CHECK-2: ret void 264f4a2713aSLionel Sambuc 265f4a2713aSLionel Sambuc // PackedMembers copy-assignment: 266*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* dereferenceable({{[0-9]+}})) 267f4a2713aSLionel Sambuc // CHECK: call void @_ZN6NonPODC1ERKS_ 268f4a2713aSLionel Sambuc // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}}) 269f4a2713aSLionel Sambuc // CHECK: ret void 270