llvm-project/llvm/lib/Transforms
Rong Xu a12f6d3c7b [PGO] Fix __llvm_profile_raw_version linkage in MACHO
IR instrumentation generates a COMDAT symbol __llvm_profile_raw_version to
overwrite the same symbol in profile run-time to distinguish IR profiles from
Clang generated profiles. In MACHO, LinkOnceODR linkage is used due to the
lack of COMDAT support.

But LinkOnceODR linkage might have .weak_def_can_be_hidden assembly directive,
while the weak variable in run-time has a .weak_definition directive. Linker
will not merge these two symbols even they have the same name. The end result
is IR profiles are not properly flagged in MACHO.

This patch changes the linkage for __llvm_profile_raw_version in each module to
LinkOnceAny so that it has same .weak_definition directive as in the run-time.

Differential Revision: http://reviews.llvm.org/D20078

llvm-svn: 268969
2016-05-09 21:03:06 +00:00
..
Hello Remove autoconf support 2016-01-26 21:29:08 +00:00
IPO [PM] code refactoring -- preparation for new PM porting /NFC 2016-05-07 05:39:12 +00:00
InstCombine [InstCombine] Fold icmp eq/ne (udiv i32 A, B), 0 -> icmp ugt/ule B, A. 2016-05-09 19:30:20 +00:00
Instrumentation [PGO] Fix __llvm_profile_raw_version linkage in MACHO 2016-05-09 21:03:06 +00:00
ObjCARC Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to the cmake build to enable them. 2016-04-29 15:22:48 +00:00
Scalar [GVN] PRE of unordered loads 2016-05-06 21:43:51 +00:00
Utils Optimize a printf with a double procent to putchar. 2016-05-09 14:36:16 +00:00
Vectorize Remove dead include. NFC. 2016-05-05 17:55:51 +00:00
CMakeLists.txt
LLVMBuild.txt