1 // RUN: %clang_cc1 -emit-llvm -o - -O1 %s | FileCheck %s 2 // 3 // Check that we generate !tbaa.struct metadata for struct copies. 4 struct A { 5 short s; 6 int i; 7 char c; 8 int j; 9 }; 10 11 void copy(struct A *a, struct A *b) { 12 *a = *b; 13 } 14 15 // CHECK: target datalayout = "{{.*}}p:[[P:64|32]] 16 // CHECK: call void @llvm.memcpy.p0i8.p0i8.i[[P]](i8* %{{.*}}, i8* %{{.*}}, i[[P]] 16, i32 4, i1 false), !tbaa.struct [[TS:!.*]] 17 // CHECK: [[TS]] = metadata !{i64 0, i64 2, metadata !{{.*}}, i64 4, i64 4, metadata !{{.*}}, i64 8, i64 1, metadata !{{.*}}, i64 12, i64 4, metadata !{{.*}}} 18