blob: ac7274cee2d2e631b190d4978c49898eec16a2ef [file] [log] [blame]
Dehao Chen5e97f232017-08-24 21:37:33 +00001// Test to ensure -emit-llvm profile-sample-accurate is honored in ThinLTO.
2// RUN: %clang -O2 %s -flto=thin -fprofile-sample-accurate -c -o %t.o
3// RUN: llvm-lto -thinlto -o %t %t.o
4// RUN: %clang_cc1 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -emit-llvm -o - | FileCheck %s
5
Hans Wennborg8f1559c2017-08-30 23:26:38 +00006// CHECK: define{{.*}} void @foo()
7// CHECK: attributes{{.*}} "profile-sample-accurate"
Dehao Chen5e97f232017-08-24 21:37:33 +00008void foo() {
9}