llvm-project/clang/test/Integration/thinlto_profile_sample_accurate.c
Wael Yehia 645f6dcd69 [ThinLTO][AIX] Enable thinlto on AIX
Starting from AIX 7.2 TL5 SP6 and AIX 7.3 TL2 the system linker supports thinLTO.

Reviewed By: ZarkoCA, MaskRay

Differential Revision: https://reviews.llvm.org/D155700
2023-07-19 17:37:15 +00:00

10 lines
386 B
C

// 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(void) {
}