[PATCH] D20078: PGO] Fix __llvm_profile_raw_version linkage in MACHO

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 13:56:45 PDT 2016


vsk accepted this revision.
vsk added a comment.
This revision is now accepted and ready to land.

> Our tests show that what attribute (weak_def_can_be_hidden or weak_definition) to use does not seem to matter --- we just cannot mix this two. I chose weak_definition because it's easier to write the code in the profile run-time (just use __attribute__((weak)) as it's). It's harder to write code to generate the weak_def_can_be_hidden attribute.


Got it. According to that commit, weak_def_can_be_hidden is appropriate if the symbol's address isn't taken. It seems like .weak_definition is more suitable here, then.


http://reviews.llvm.org/D20078





More information about the llvm-commits mailing list