================ @@ -0,0 +1,17 @@ +// RUN: %clang_pgogen -o %t %s +// RUN: not %t +// RUN: %clang -o %t %s +// RUN: %t + +__attribute__((weak)) void __llvm_profile_reset_counters(void); + +__attribute__((noinline)) int bar() { return 4; } +int foo() { + if (__llvm_profile_reset_counters) { + __llvm_profile_reset_counters(); + return 0; + } + return bar(); ---------------- qiongsiwu wrote:
Ah good point! I think neither `foo` or `bar` is necessary. The code is simplified. https://github.com/llvm/llvm-project/pull/76471 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits