It is not safe to set private linkage for the profd variable created for the COMDAT function. For the LTO build where the COMDAT group might be dissolved. If that happens, we will have multiple "profd" in the final binary and result in multiple function counters for the same function.
This fixes PR58215: https://github.com/llvm/llvm-project/issues/58215.