xref: /llvm-project/clang/test/CodeGenCXX/microsoft-abi-unknown-arch.cpp (revision 158d72d728261c1e54dc77931372b2322c52849f)
1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=ppc64-windows-msvc | FileCheck %s
2 
3 // The purpose of this test is to see that we do something reasonable for
4 // architectures where we haven't checked what MSVC does.
5 
6 struct A {
AA7   A() : a(42) {}
AA8   A(const A &o) : a(o.a) {}
~AA9   ~A() {}
10   int a;
11 };
12 
13 struct B {
14   A foo(A o);
15 };
16 
foo(A x)17 A B::foo(A x) {
18   return x;
19 }
20 
21 // CHECK-LABEL: define{{.*}} void @"?foo@B@@QEAA?AUA@@U2@@Z"(ptr {{[^,]*}} %this, ptr dead_on_unwind noalias writable sret(%struct.A) align 4 %agg.result, ptr noundef %x)
22