llvm-project/clang/test/CodeGenCXX/microsoft-abi-unknown-arch.cpp
Matt Arsenault 55c4ff91bd OpaquePtr: Add type to sret attribute
Make the corresponding change that was made for byval in
b7141207a483d39b99c2b4da4eb3bb591eca9e1a. Like byval, this requires a
bulk update of the test IR tests to include the type before this can
be mandatory.
2020-09-25 14:07:30 -04:00

22 lines
497 B
C++

// RUN: %clang_cc1 -emit-llvm %s -o - -triple=ppc64-windows-msvc | FileCheck %s
// The purpose of this test is to see that we do something reasonable for
// architectures where we haven't checked what MSVC does.
struct A {
A() : a(42) {}
A(const A &o) : a(o.a) {}
~A() {}
int a;
};
struct B {
A foo(A o);
};
A B::foo(A x) {
return x;
}
// CHECK-LABEL: define void @"?foo@B@@QEAA?AUA@@U2@@Z"(%struct.B* %this, %struct.A* noalias sret(%struct.A) align 4 %agg.result, %struct.A* %x)