teresajohnson wrote: The way we have done this in the past is to declare these as weak symbols and check if they exist before calling. E.g.:
``` extern "C" __attribute__((weak)) int __llvm_profile_dump(void); if (__llvm_profile_dump) if (__llvm_profile_dump() != 0) { ... ``` Not necessarily opposed to adding the macros etc, but the advantage of the weak symbol approach vs what you have here is that the user code can check the return values. 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