2018-07-13 02:09:03 +08:00
|
|
|
REQUIRES: linux, lld-available
|
2019-05-03 00:45:17 +08:00
|
|
|
# LLD isn't pruning functions as we expect it to with ASAN on i386.
|
|
|
|
UNSUPPORTED: i386
|
2017-09-16 07:07:18 +08:00
|
|
|
|
|
|
|
No gc-sections:
|
|
|
|
RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t
|
|
|
|
RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker | count 1
|
|
|
|
|
2018-07-13 04:24:58 +08:00
|
|
|
With gc-sections. Currently, we can't remove unused code except with LLD.
|
2018-07-13 02:09:03 +08:00
|
|
|
RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -fuse-ld=lld -ffunction-sections -Wl,-gc-sections
|
2018-06-16 04:12:58 +08:00
|
|
|
RUN: nm %t | not grep UnusedFunctionShouldBeRemovedByLinker
|
2018-07-13 04:24:58 +08:00
|
|
|
RUN: %run %t -runs=0 2>&1 | FileCheck %s
|
2017-09-16 07:07:18 +08:00
|
|
|
|
2018-08-15 06:04:34 +08:00
|
|
|
CHECK-NOT: ERROR: The size of coverage PC tables does not match
|