blob: 339f16e0f798be6a4af0d71e1ea74ee015697c2e [file] [log] [blame]
Daniel Dunbare06a75f2009-03-11 22:05:26 +00001// RUN: clang -triple i386-unknown-unknown -emit-llvm -o %t %s &&
2// RUN: grep 'define signext i8 @f0()' %t &&
3// RUN: grep 'define signext i16 @f1()' %t &&
4// RUN: grep 'define i32 @f2()' %t &&
5// RUN: grep 'define float @f3()' %t &&
6// RUN: grep 'define double @f4()' %t &&
7// RUN: grep 'define x86_fp80 @f5()' %t &&
8// RUN: grep 'define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8\* %a4)' %t &&
9// RUN: grep 'define void @f7(i32 %a0)' %t &&
10// RUN: grep 'define i64 @f8_1()' %t &&
11// RUN: grep 'define void @f8_2(i32 %a0.0, i32 %a0.1)' %t &&
12// RUN: grep 'define i64 @f9_1()' %t &&
13
14// FIXME: This is wrong, but we want the coverage of the other
15// tests. This should be the same as @f8_2.
16// RUN: grep 'define void @f9_2(%.truct.s9\* byval %a0)' %t &&
17
18// RUN: true
19
20char f0(void) {
21}
22
23short f1(void) {
24}
25
26int f2(void) {
27}
28
29float f3(void) {
30}
31
32double f4(void) {
33}
34
35long double f5(void) {
36}
37
38void f6(char a0, short a1, int a2, long long a3, void *a4) {
39}
40
41typedef enum { A, B, C } E;
42
43void f7(E a0) {
44}
45
46struct s8 {
47 int a;
48 int b;
49};
50struct s8 f8_1(void) {
51}
52void f8_2(struct s8 a0) {
53}
54
55// This should be passed just as s8.
56
57// FIXME: This is currently broken, but the test case is accepting it
58// so we get coverage of the other cases.
59struct s9 {
60 int a : 17;
61 int b;
62};
63struct s9 f9_1(void) {
64}
65void f9_2(struct s9 a0) {
66}
67