brintos

brintos / llvm-project-archived public Read only

0
0
Text · 955 B · edb6867 Raw
22 lines · c
1// RUN: %clang -S -emit-llvm -o - -O0 %s | FileCheck %s --implicit-check-not="call void @llvm.lifetime" -check-prefixes=CHECK2// RUN: %clang -S -emit-llvm -o - -O1 %s | FileCheck %s --implicit-check-not="call void @llvm.lifetime" -check-prefixes=CHECK,LIFETIME3// RUN: %clang -S -emit-llvm -o - -O2 %s | FileCheck %s --implicit-check-not="call void @llvm.lifetime" -check-prefixes=CHECK,LIFETIME4// RUN: %clang -S -emit-llvm -o - -O3 %s | FileCheck %s --implicit-check-not="call void @llvm.lifetime" -check-prefixes=CHECK,LIFETIME5 6extern void use(char *a);7 8// CHECK-LABEL: @helper_no_markers9__attribute__((always_inline)) void helper_no_markers(void) {10  char a;11  // LIFETIME: call void @llvm.lifetime.start.p0(12  use(&a);13  // LIFETIME: call void @llvm.lifetime.end.p0(14}15 16// CHECK-LABEL: @lifetime_test17void lifetime_test(void) {18// LIFETIME: call void @llvm.lifetime.start.p0(19  helper_no_markers();20// LIFETIME: call void @llvm.lifetime.end.p0(21}22