14 lines · plain
1REQUIRES: darwin2 3No dead_strip. Unused code is not removed.4RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t5RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker6RUN: %run %t -runs=0 2>&1 | FileCheck %s7 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_strip10RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker11RUN: %run %t -runs=0 2>&1 | FileCheck %s12 13CHECK-NOT: ERROR: The size of coverage PC tables does not match14