]> granicus.if.org Git - clang/commit
PGO: Don't define instrumentation data available_externally
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 20 Mar 2014 22:50:08 +0000 (22:50 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 20 Mar 2014 22:50:08 +0000 (22:50 +0000)
commit81e3346e95b2e3f65e894f5e31d1a8141a4bbace
tree7373645c1f9999b520253c11c20e38d1a084de7e
parenteddc01635b67d2310e030631b6bc4e84820964d8
PGO: Don't define instrumentation data available_externally

Variables with available_externally linkage can be dropped at will.
This causes link errors, since there are still references to the
instrumentation!  linkonce_odr is almost equivalent, so use that
instead.

As a drive-by fix (I don't have an Elf system, so I'm not sure how to
write a testcase), use linkonce linkage for the instrumentation of
extern_weak functions.

<rdar://problem/15943240>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204408 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPGO.cpp
test/Profile/c-linkage-available_externally.c [new file with mode: 0644]