summaryrefslogtreecommitdiff
path: root/test/Integration/thinlto_profile_sample_accurate.c
blob: ac7274cee2d2e631b190d4978c49898eec16a2ef (plain)
1
2
3
4
5
6
7
8
9
// Test to ensure -emit-llvm profile-sample-accurate is honored in ThinLTO.
// RUN: %clang -O2 %s -flto=thin -fprofile-sample-accurate -c -o %t.o
// RUN: llvm-lto -thinlto -o %t %t.o
// RUN: %clang_cc1 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -emit-llvm -o - | FileCheck %s

// CHECK: define{{.*}} void @foo()
// CHECK: attributes{{.*}} "profile-sample-accurate"
void foo() {
}