Skip to content

Commit 8d3f5db

Browse files
committed
test: FileCheck'ize and document test.
llvm-svn: 116799
1 parent f5a1fbc commit 8d3f5db

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

clang/test/CodeGen/struct-passing.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s
2-
// RUN: grep 'declare i32 @f0() readnone' %t
3-
// RUN: grep 'declare i32 @f1() readonly' %t
4-
// RUN: grep 'declare void @f2(.* sret)' %t
5-
// RUN: grep 'declare void @f3(.* sret)' %t
6-
// RUN: grep 'declare void @f4(.* byval)' %t
7-
// RUN: grep 'declare void @f5(.* byval)' %t
8-
// PR3835
1+
// This verifies that structs returned from functions by value are passed
2+
// correctly according to their attributes and the ABI.
3+
// SEE: PR3835
4+
5+
// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s
96

107
typedef int T0;
118
typedef struct { int a[16]; } T1;
@@ -18,3 +15,10 @@ void __attribute__((const)) f4(T1 a);
1815
void __attribute__((pure)) f5(T1 a);
1916

2017
void *ps[] = { f0, f1, f2, f3, f4, f5 };
18+
19+
// CHECK: declare i32 @f0() readnone
20+
// CHECK: declare i32 @f1() readonly
21+
// CHECK: declare void @f2({{.*}} sret)
22+
// CHECK: declare void @f3({{.*}} sret)
23+
// CHECK: declare void @f4({{.*}} byval)
24+
// CHECK: declare void @f5({{.*}} byval)

0 commit comments

Comments
 (0)