1 // For MSVC ABI compatibility, all structures returned by value using the
2 // thiscall calling convention must use the hidden parameter.
4 // RUN: %clang_cc1 -triple i386-PC-Win32 %s -fms-compatibility -emit-llvm -o - | FileCheck %s
6 // This structure would normally be returned via EAX
11 // This structure would normally be returned via EAX/EDX
21 struct S
__attribute__((thiscall
)) Small() const {
26 struct M
__attribute__((thiscall
)) Medium() const {
32 // CHECK-LABEL: define{{.*}} void @_Z4testv()
34 // CHECK: call void @_ZN1CC1Ev(ptr {{[^,]*}} [[C:%.+]])
37 // CHECK: call x86_thiscallcc void @_ZNK1C5SmallEv(ptr sret(%struct.S) align 4 %{{.+}}, ptr {{[^,]*}} [[C]])
39 // CHECK: call x86_thiscallcc void @_ZNK1C6MediumEv(ptr sret(%struct.M) align 4 %{{.+}}, ptr {{[^,]*}} [[C]])