2018-10-12 21:59:56 +08:00
|
|
|
REQUIRES: darwin
|
|
|
|
|
|
|
|
No dead_strip. Unused code is not removed.
|
|
|
|
RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t
|
2019-01-31 11:03:06 +08:00
|
|
|
RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker
|
2018-10-12 21:59:56 +08:00
|
|
|
RUN: %run %t -runs=0 2>&1 | FileCheck %s
|
|
|
|
|
2019-01-31 11:03:06 +08:00
|
|
|
With dead_strip. Unused code is (currently) not removed. (It would be better if it was removed!)
|
2018-10-12 21:59:56 +08:00
|
|
|
RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -ffunction-sections -Wl,-dead_strip
|
2019-01-31 11:03:06 +08:00
|
|
|
RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker
|
2018-10-12 21:59:56 +08:00
|
|
|
RUN: %run %t -runs=0 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
CHECK-NOT: ERROR: The size of coverage PC tables does not match
|