Chad Rosier | 07d1642 | 2012-02-27 18:45:03 +0000 | [diff] [blame] | 1 | // RUN: %clang -S -emit-llvm -o - -O0 %s | FileCheck %s -check-prefix=O0 |
| 2 | // RUN: %clang -S -emit-llvm -o - -O1 %s | FileCheck %s -check-prefix=O1 |
| 3 | // RUN: %clang -S -emit-llvm -o - -O2 %s | FileCheck %s -check-prefix=O2 |
| 4 | // RUN: %clang -S -emit-llvm -o - -O3 %s | FileCheck %s -check-prefix=O3 |
| 5 | |
| 6 | extern void use(char *a); |
| 7 | |
| 8 | __attribute__((always_inline)) void helper_no_markers() { |
| 9 | char a; |
| 10 | use(&a); |
| 11 | } |
| 12 | |
| 13 | void lifetime_test() { |
| 14 | // O0: lifetime_test |
| 15 | // O1: lifetime_test |
| 16 | // O2: lifetime_test |
| 17 | // O3: lifetime_test |
| 18 | // O0-NOT: @llvm.lifetime.start |
| 19 | // O1: @llvm.lifetime.start |
| 20 | // O2: @llvm.lifetime.start |
| 21 | // O3: @llvm.lifetime.start |
| 22 | helper_no_markers(); |
| 23 | } |