1 | // REQUIRES: lld-available |
2 | /// With lld -opt:ref we can ensure discarded[01] and their profc/profd |
3 | /// variables are discarded. |
4 | |
5 | // RUN: %clang_profgen -fcoverage-mapping -ffunction-sections -fuse-ld=lld -Wl,-debug:symtab,-opt:noref %S/coverage-linkage.cpp -o %t |
6 | // RUN: llvm-nm %t | FileCheck %s --check-prefix=NOGC |
7 | // RUN: %clang_profgen -fcoverage-mapping -ffunction-sections -fuse-ld=lld -Wl,-debug:symtab,-opt:ref %S/coverage-linkage.cpp -o %t |
8 | // RUN: llvm-nm %t | FileCheck %s --check-prefix=GC |
9 | |
10 | // NOGC: T ?discarded{{.*}} |
11 | // GC-NOT: T ?discarded{{.*}} |
12 | |