17 lines · c
1// Test the linker feature that treats undefined weak symbols as null values.2 3// RUN: %clang_pgogen -o %t %s4// RUN: not %t5// RUN: %clang -o %t %s6// RUN: %t7 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