| 1 | // Test the linker feature that treats undefined weak symbols as null values. |
|---|---|
| 2 | |
| 3 | // RUN: %clang_pgogen -o %t %s |
| 4 | // RUN: not %t |
| 5 | // RUN: %clang -o %t %s |
| 6 | // RUN: %t |
| 7 | |
| 8 | __attribute__((weak)) void __llvm_profile_reset_counters(void); |
| 9 | |
| 10 | int main() { |
| 11 | if (__llvm_profile_reset_counters) { |
| 12 | __llvm_profile_reset_counters(); |
| 13 | return 1; |
| 14 | } |
| 15 | return 0; |
| 16 | } |
| 17 |
