qiongsiwu wrote:

> > @teresajohnson I mentioned the same thing on 
> > [discourse](https://discourse.llvm.org/t/pgo-are-the-llvm-profile-functions-stable-c-apis-across-llvm-releases/75832/5)
> >  but it seems like linking on AIX does not support this model.
> 
> I see. Perhaps instead of defining these away completely, they should be 
> defined to a dummy function with the same signature that always returns 
> success (0 I think)? Alternatively, not define them at all when 
> __LLVM_INSTR_PROFILE_GENERATE not defined and have the user guard calls by 
> `#ifdef __LLVM_INSTR_PROFILE_GENERATE`. Otherwise, the user either cannot 
> check the return values, or they have to guard their usage by a check of 
> __LLVM_INSTR_PROFILE_GENERATE anyway.

Ah good catch! Thanks so much! The definitions of `__llvm_profile_dump` and 
`__llvm_orderfile_dump` are revised to `(0)` so they can be used in `if` 
conditions. See 
https://github.com/llvm/llvm-project/pull/76471/commits/cce25f062c00424c153254fc159309808441414c#diff-c21b547d913313490258f0fdb733251d783c5c5a242429ccc2fa5672914f22a2R58.
 

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

Reply via email to