llvm-project/compiler-rt/test/profile/Linux/coverage-linkage-lld.cpp

9 lines
322 B
C++

// REQUIRES: lld-available
/// With lld --gc-sections we can ensure discarded[01] and their profc/profd
/// variables are discarded.
// RUN: %clang_profgen -fcoverage-mapping -ffunction-sections -fuse-ld=lld -Wl,--gc-sections %S/coverage-linkage.cpp -o %t
// RUN: llvm-nm %t | FileCheck %s
// CHECK-NOT: discarded{{.*}}