1 REQUIRES: linux, lld-available
2 # LLD isn't pruning functions as we expect it to with ASAN on i386.
6 RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t
7 RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker | count 1
9 With gc-sections. Currently, we can't remove unused code except with LLD.
10 RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -fuse-ld=lld -ffunction-sections -Wl,-gc-sections
11 RUN: nm %t | not grep UnusedFunctionShouldBeRemovedByLinker
12 RUN: %run %t -runs=0 2>&1 | FileCheck %s
14 CHECK-NOT: ERROR: The size of coverage PC tables does not match