[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / iamcu-abi.c
blob0cd8bddab3322a52561bb7d482abe809b9eaae29
1 // RUN: %clang_cc1 -triple i386-pc-elfiamcu -emit-llvm -o - %s | FileCheck %s
3 // CHECK: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:32-f64:32-f128:32-n8:16:32-a:0:32-S32"
4 // CHECK: target triple = "i386-pc-elfiamcu"
6 void food(double *d);
7 void fooll(long long *ll);
8 void fooull(unsigned long long *ull);
9 void foold(long double *ld);
11 // CHECK-LABEL: define{{.*}} void @testdouble()
12 // CHECK: alloca double, align 4
13 void testdouble(void) {
14 double d = 2.0;
15 food(&d);
18 // CHECK-LABEL: define{{.*}} void @testlonglong()
19 // CHECK: alloca i64, align 4
20 void testlonglong(void) {
21 long long ll = 2;
22 fooll(&ll);
25 // CHECK-LABEL: define{{.*}} void @testunsignedlonglong()
26 // CHECK: alloca i64, align 4
27 void testunsignedlonglong(void) {
28 unsigned long long ull = 2;
29 fooull(&ull);
32 // CHECK-LABEL: define{{.*}} void @testlongdouble()
33 // CHECK: alloca double, align 4
34 void testlongdouble(void) {
35 long double ld = 2.0;
36 foold(&ld);