]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/builtins-ms.c
Vendor import of clang trunk r290819:
[FreeBSD/FreeBSD.git] / test / CodeGen / builtins-ms.c
1 // RUN: %clang_cc1 %s -emit-llvm -o - -fms-extensions -triple i686-pc-win32 | FileCheck %s
2
3 // CHECK-LABEL: define void @test_alloca(
4 void capture(void *);
5 void test_alloca(int n) {
6   capture(_alloca(n));
7   // CHECK: %[[arg:.*]] = alloca i8, i32 %{{.*}}, align 16
8   // CHECK: call void @capture(i8* %[[arg]])
9 }
10
11 // CHECK-LABEL: define void @test_alloca_with_align(
12 void test_alloca_with_align(int n) {
13   capture(__builtin_alloca_with_align(n, 64));
14   // CHECK: %[[arg:.*]] = alloca i8, i32 %{{.*}}, align 8
15   // CHECK: call void @capture(i8* %[[arg]])
16 }