================ @@ -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(); ---------------- snehasish wrote:
Do we need bar or can we just return 1 here (and remove the subtraction below)? Perhaps the no-inline just needs to be applied to foo then. 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