xref: /llvm-project/compiler-rt/test/fuzzer/dead-stripping.test (revision 7e0219d979e52dd6795e4187f313c76d23599123)
1REQUIRES: darwin
2
3No dead_strip. Unused code is not removed.
4RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t
5RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker
6RUN: %run %t -runs=0 2>&1 | FileCheck %s
7
8With dead_strip. Unused code is (currently) not removed. (It would be better if it was removed!)
9RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -ffunction-sections -Wl,-dead_strip
10RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker
11RUN: %run %t -runs=0 2>&1 | FileCheck %s
12
13CHECK-NOT: ERROR: The size of coverage PC tables does not match
14