1 // RUN: %clang_cc1 -triple i686-pc-mingw32 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK32 --check-prefix=CHECK
2 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc19.11.0 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK64 --check-prefix=CHECK
13 // CHECK32: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %{{.*}}, ptr align 4 %{{.*}}, i32 4, i1 false)
14 // CHECK64: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %{{.*}}, ptr align 4 %{{.*}}, i64 4, i1 false)
15 var
.Test1::Test1(var
);
20 Test2() { a
= 10; b
= 10; }
26 // CHECK: %var = alloca %class.Test2, align 4
27 // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test2C1Ev(ptr {{[^,]*}} %var)
28 // CHECK64-NEXT: %call = call noundef ptr @"??0Test2@@QEAA@XZ"(ptr {{[^,]*}} %var)
31 // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test2C1Ev(ptr {{[^,]*}} %var)
32 // CHECK64-NEXT: %call1 = call noundef ptr @"??0Test2@@QEAA@XZ"(ptr {{[^,]*}} %var)
35 // CHECK32: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %{{.*}}, ptr align 4 %{{.*}}, i32 8, i1 false)
36 // CHECK64: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %{{.*}}, ptr align 4 %{{.*}}, i64 8, i1 false)
37 var
.Test2::Test2(var
);
45 Test3() { a
= 10; b
= 15; c
= 20; }
46 Test3(const Test3
& that
) { a
= that
.a
; b
= that
.b
; c
= that
.c
; }
53 // CHECK32: call x86_thiscallcc void @_ZN5Test3C1Ev(ptr {{[^,]*}} %var)
54 // CHECK64: %call = call noundef ptr @"??0Test3@@QEAA@XZ"(ptr {{[^,]*}} %var)
57 // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(ptr {{[^,]*}} %var2)
58 // CHECK64-NEXT: %call1 = call noundef ptr @"??0Test3@@QEAA@XZ"(ptr {{[^,]*}} %var2)
61 // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(ptr {{[^,]*}} %var)
62 // CHECK64-NEXT: %call2 = call noundef ptr @"??0Test3@@QEAA@XZ"(ptr {{[^,]*}} %var)
65 // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1ERKS_(ptr {{[^,]*}} %var, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %var2)
66 // CHECK64-NEXT: %call3 = call noundef ptr @"??0Test3@@QEAA@AEBV0@@Z"(ptr {{[^,]*}} %var, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %var2)
67 var
.Test3::Test3(var2
);