1 // RUN: %clang_cc1 -fprofile-instrument=llvm -disable-llvm-passes \
2 // RUN: -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -fprofile-instrument=csllvm -disable-llvm-passes \
4 // RUN: -emit-llvm -o - %s | FileCheck %s
5 // RUN: %clang_cc1 -fprofile-instrument=clang -disable-llvm-passes \
6 // RUN: -emit-llvm -o - %s | FileCheck %s
7 // RUN: %clang_cc1 -coverage-data-file=/dev/null -disable-llvm-passes \
8 // RUN: -emit-llvm -o - %s | FileCheck %s
9 int g(int);
10
no_instr(void)11 void __attribute__((no_profile_instrument_function)) no_instr(void) {
12 // CHECK: define {{.*}}void @no_instr() [[ATTR:#[0-9]+]]
13 }
14
instr(void)15 void instr(void) {
16 // CHECK: define {{.*}}void @instr() [[ATTR2:#[0-9]+]]
17 }
18 // CHECK: attributes [[ATTR]] = {{.*}} noprofile
19 // CHECK: attributes [[ATTR2]] = {
20 // CHECK-NOT: noprofile
21 // CHECK: }
22