2020-07-23 01:15:51 +08:00
|
|
|
// REQUIRES: binutils_lto
|
2020-07-11 00:40:09 +08:00
|
|
|
|
2021-06-19 07:44:03 +08:00
|
|
|
// RUN: rm -rf %t.profraw
|
|
|
|
// RUN: %clang_pgogen=%t.profraw/ -fuse-ld=bfd -flto %s -o %t
|
2020-07-11 00:40:09 +08:00
|
|
|
// RUN: %run %t
|
|
|
|
// RUN: llvm-profdata merge %t.profraw -o %t.profdata
|
|
|
|
// RUN: llvm-profdata show %t.profdata | FileCheck %s
|
|
|
|
|
2020-07-23 01:15:51 +08:00
|
|
|
/// Test that we work around https://sourceware.org/bugzilla/show_bug.cgi?id=26262
|
|
|
|
/// (as of GNU ld 2.35) which happens when trying to generate IR profile with
|
|
|
|
/// BFD linker + LLVMgold.so
|
2020-07-11 00:40:09 +08:00
|
|
|
|
|
|
|
// CHECK: Instrumentation level: IR
|
|
|
|
int main() { return 0; }
|