[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Frontend / remarks-hotness.cpp
blob72753d014ff2f7dbf83fcb88eadb7e3472108181
1 // Without hotness threshold, print both hot and cold remarks.
2 // RUN: %clang_cc1 -triple x86_64-linux %s -emit-llvm-only -O3 \
3 // RUN: -fprofile-sample-use=%S/Inputs/remarks-hotness.prof \
4 // RUN: -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline \
5 // RUN: -fdiagnostics-show-hotness 2>&1 \
6 // RUN: | FileCheck -check-prefix=REMARKS %s
8 // With auto hotness threshold, only print hot remarks.
9 // RUN: %clang_cc1 -triple x86_64-linux %s -emit-llvm-only -O3 \
10 // RUN: -fprofile-sample-use=%S/Inputs/remarks-hotness.prof \
11 // RUN: -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline \
12 // RUN: -fdiagnostics-show-hotness \
13 // RUN: -fdiagnostics-hotness-threshold=auto 2>&1 \
14 // RUN: | FileCheck -check-prefix=HOT_CALL %s
16 int callee1() {
17 return 1;
20 __attribute__((noinline)) int callee2() {
21 return 2;
24 // REMARKS: '_Z7callee1v' inlined into '_Z7caller1v'
25 // HOT_CALL: '_Z7callee1v' inlined into '_Z7caller1v'
26 int caller1() {
27 return callee1();
30 // REMARKS: '_Z7callee2v' not inlined into '_Z7caller2v'
31 // HOT_CALL-NOT: '_Z7callee2v' not inlined into '_Z7caller2v'
32 int caller2() {
33 return callee2();