llvm/clang/test/CodeGenCXX/arm-cc.cpp
Matt Arsenault 0a7cd99a70 Reapply "OpaquePtr: Add type to sret attribute"
This reverts commit eb9f7c28e5.

Previously this was incorrectly handling linking of the contained
type, so this merges the fixes from D88973.
2020-10-16 11:05:02 -04:00

21 lines
424 B
C++

// RUN: %clang_cc1 %s -triple=arm-unknown-linux-gnueabi -target-abi aapcs -emit-llvm -o - | FileCheck %s
class SMLoc {
const char *Ptr;
public:
SMLoc();
SMLoc(const SMLoc &RHS);
};
SMLoc foo(void *p);
void bar(void *x) {
foo(x);
}
void zed(SMLoc x);
void baz() {
SMLoc a;
zed(a);
}
// CHECK: declare void @_Z3fooPv(%class.SMLoc* sret(%class.SMLoc) align 4, i8*)
// CHECK: declare void @_Z3zed5SMLoc(%class.SMLoc*)