summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/no_profile.c
blob: e426ae5fe28947f6813f0a145818ca9e1e007e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: %clang_cc1 -fprofile-instrument=llvm -disable-llvm-passes \
// RUN:   -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=csllvm -disable-llvm-passes \
// RUN:   -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -disable-llvm-passes \
// RUN:   -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -coverage-data-file /dev/null -disable-llvm-passes \
// RUN:   -emit-llvm -o - %s | FileCheck %s
int g(int);

void __attribute__((no_profile_instrument_function)) no_instr(void) {
// CHECK: define {{.*}}void @no_instr() [[ATTR:#[0-9]+]]
}

void instr(void) {
// CHECK: define {{.*}}void @instr() [[ATTR2:#[0-9]+]]
}
// CHECK: attributes [[ATTR]] = {{.*}} noprofile
// CHECK: attributes [[ATTR2]] = {
// CHECK-NOT: noprofile
// CHECK: }