summaryrefslogtreecommitdiff
path: root/compiler-rt/test/profile/Windows/coverage-linkage-lld.cpp
blob: 714e4513bc20ff4f0bdeadb2ca6fa259866a7b28 (plain)
1
2
3
4
5
6
7
8
9
10
11
// REQUIRES: lld-available
/// With lld -opt:ref we can ensure discarded[01] and their profc/profd
/// variables are discarded.

// RUN: %clang_profgen -fcoverage-mapping -ffunction-sections -fuse-ld=lld -Wl,-debug:symtab,-opt:noref %S/coverage-linkage.cpp -o %t
// RUN: llvm-nm %t | FileCheck %s --check-prefix=NOGC
// RUN: %clang_profgen -fcoverage-mapping -ffunction-sections -fuse-ld=lld -Wl,-debug:symtab,-opt:ref %S/coverage-linkage.cpp -o %t
// RUN: llvm-nm %t | FileCheck %s --check-prefix=GC

// NOGC:   T ?discarded{{.*}}
// GC-NOT: T ?discarded{{.*}}