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
10int main() {
11 if (__llvm_profile_reset_counters) {
12 __llvm_profile_reset_counters();
13 return 1;
14 }
15 return 0;
16}
17

source code of compiler-rt/test/profile/Linux/instrprof-weak-symbol.c