================ @@ -12,6 +12,19 @@ #include "InstrProfilingPort.h" #include <stdio.h> +// Make sure __LLVM_INSTR_PROFILE_GENERATE is always defined before +// including instr_prof_interface.h so the interface functions are +// declared correctly for the runtime. Additionally, make sure +// that __LLVM_INSTR_PROFILE_GENERATE is undefined only when it is +// not explicitly defined somewhere else. +#ifndef __LLVM_INSTR_PROFILE_GENERATE +#define __LLVM_INSTR_PROFILE_GENERATE +#include "profile/instr_prof_interface.h" +#undef __LLVM_INSTR_PROFILE_GENERATE +#else ---------------- snehasish wrote:
Is this `else` for the case where compiler-rt itself is instrumented? I don't think we support this. 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