Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / use-sample-profile-attr.c
blob9c24355d67dba754e0f8703cd56093245bb5fa2f
1 // Test use-sample-profile attribute is present only when SampleFDO
2 // is enabled.
3 //
4 // RUN: %clang_cc1 -O2 \
5 // RUN: -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -emit-llvm -o - \
6 // RUN: 2>&1 | FileCheck %s
7 // RUN: %clang_cc1 -O2 %s -emit-llvm -o - \
8 // RUN: 2>&1 | FileCheck %s --check-prefix=NOATTR
10 // CHECK: define{{.*}} @func{{.*}} #[[ATTRID:[0-9]+]]
11 // CHECK: attributes #[[ATTRID]] = {{.*}} "use-sample-profile"
12 // NOATTR: define{{.*}} @func{{.*}} #[[ATTRID:[0-9]+]]
13 // NOATTR-NOT: attributes #[[ATTRID]] = {{.*}} "use-sample-profile"
15 int func(int a) { return a; }