15 lines · plain
1REQUIRES: linux, lld-available2# LLD isn't pruning functions as we expect it to with ASAN on i386.3UNSUPPORTED: i3864 5No gc-sections:6RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t7RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker | count 18 9With gc-sections. Currently, we can't remove unused code except with LLD.10RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -fuse-ld=lld -ffunction-sections -Wl,-gc-sections11RUN: nm %t | not grep UnusedFunctionShouldBeRemovedByLinker12RUN: %run %t -runs=0 2>&1 | FileCheck %s13 14CHECK-NOT: ERROR: The size of coverage PC tables does not match15