[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / clang / test / CodeGen / sret.c
blob6d905e89b2c6fdb45d767f0b3d9c260ebb246176
1 // RUN: %clang_cc1 %s -Wno-strict-prototypes -emit-llvm -o - | FileCheck %s
3 struct abc {
4 long a;
5 long b;
6 long c;
7 long d;
8 long e;
9 };
11 struct abc foo1(void);
12 // CHECK-DAG: declare {{.*}} @foo1(ptr dead_on_unwind writable sret(%struct.abc)
13 struct abc foo2();
14 // CHECK-DAG: declare {{.*}} @foo2(ptr dead_on_unwind writable sret(%struct.abc)
15 struct abc foo3(void){}
16 // CHECK-DAG: define {{.*}} @foo3(ptr dead_on_unwind noalias writable sret(%struct.abc)
18 void bar(void) {
19 struct abc dummy1 = foo1();
20 // CHECK-DAG: call {{.*}} @foo1(ptr dead_on_unwind writable sret(%struct.abc)
21 struct abc dummy2 = foo2();
22 // CHECK-DAG: call {{.*}} @foo2(ptr dead_on_unwind writable sret(%struct.abc)