| 1 |
// RUN: %clang_cc1 %s -Wno-strict-prototypes -emit-llvm -o - | FileCheck %s |
| 2 |
|
| 3 |
struct abc { |
| 4 |
long a; |
| 5 |
long b; |
| 6 |
long c; |
| 7 |
long d; |
| 8 |
long e; |
| 9 |
}; |
| 10 |
|
| 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) |
| 17 |
|
| 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) |
| 23 |
} |