1// REQUIRES: lld-available
2
3// FIXME: Investigate and fix.
4// XFAIL: powerpc64-target-arch
5
6/// With lld --gc-sections we can ensure discarded[01] and their profc/profd
7/// variables are discarded.
8
9// RUN: %clang_profgen -fcoverage-mapping -ffunction-sections -fuse-ld=lld -Wl,--gc-sections %S/coverage-linkage.cpp -o %t
10// RUN: llvm-nm %t | FileCheck %s
11
12// CHECK-NOT: discarded{{.*}}
13

source code of compiler-rt/test/profile/Linux/coverage-linkage-lld.cpp