[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / lifetime.c
blob748a496a6e9ea55235debccc7a386f1f5671c81a
1 // RUN: %clang -S -emit-llvm -o - -O0 %s | FileCheck %s --implicit-check-not="call void @llvm.lifetime" -check-prefixes=CHECK
2 // RUN: %clang -S -emit-llvm -o - -O1 %s | FileCheck %s --implicit-check-not="call void @llvm.lifetime" -check-prefixes=CHECK,LIFETIME
3 // RUN: %clang -S -emit-llvm -o - -O2 %s | FileCheck %s --implicit-check-not="call void @llvm.lifetime" -check-prefixes=CHECK,LIFETIME
4 // RUN: %clang -S -emit-llvm -o - -O3 %s | FileCheck %s --implicit-check-not="call void @llvm.lifetime" -check-prefixes=CHECK,LIFETIME
6 extern void use(char *a);
8 // CHECK-LABEL: @helper_no_markers
9 __attribute__((always_inline)) void helper_no_markers(void) {
10 char a;
11 // LIFETIME: call void @llvm.lifetime.start.p0(i64 1,
12 use(&a);
13 // LIFETIME: call void @llvm.lifetime.end.p0(i64 1,
16 // CHECK-LABEL: @lifetime_test
17 void lifetime_test(void) {
18 // LIFETIME: call void @llvm.lifetime.start.p0(i64 1,
19 helper_no_markers();
20 // LIFETIME: call void @llvm.lifetime.end.p0(i64 1,