blob: 860caff7de88207b94eb2956d010ff165e67c5d4 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o %t %s &&
Daniel Dunbar644f4c32009-02-14 02:09:24 +00002// 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 &&
Anders Carlsson730f9092009-02-26 17:38:19 +00008// RUN: grep 'define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8\* %a4)' %t &&
Daniel Dunbar100f4022009-03-06 17:50:25 +00009// RUN: grep 'define void @f7(i32 %a0)' %t &&
10// RUN: grep 'type { i64, double }.*type .0' %t &&
11// RUN: grep 'define .0 @f8_1()' %t &&
12// RUN: grep 'define void @f8_2(.0)' %t
Daniel Dunbar644f4c32009-02-14 02:09:24 +000013
14char f0(void) {
15}
16
17short f1(void) {
18}
19
20int f2(void) {
21}
22
23float f3(void) {
24}
25
26double f4(void) {
27}
28
29long double f5(void) {
30}
31
32void f6(char a0, short a1, int a2, long long a3, void *a4) {
33}
Anders Carlsson730f9092009-02-26 17:38:19 +000034
35typedef enum { A, B, C } E;
36
37void f7(E a0) {
Mike Stump4b871422009-02-26 19:00:14 +000038}
Daniel Dunbar100f4022009-03-06 17:50:25 +000039
40// Test merging/passing of upper eightbyte with X87 class.
41union u8 {
42 long double a;
43 int b;
44};
45union u8 f8_1() {}
46void f8_2(union u8 a0) {}