diff options
| author | Rong Xu <xur@google.com> | 2016-05-11 00:31:59 +0000 |
|---|---|---|
| committer | Rong Xu <xur@google.com> | 2016-05-11 00:31:59 +0000 |
| commit | ca28a0afb630f2668c7b98e17ffda411bcca36ee (patch) | |
| tree | aebd795a4da1d23e294bfd570dfcde675a347395 | |
| parent | e8ed8e59e53c58ed20279c622ee8fb5e40a75516 (diff) | |
| download | bcm5719-llvm-ca28a0afb630f2668c7b98e17ffda411bcca36ee.tar.gz bcm5719-llvm-ca28a0afb630f2668c7b98e17ffda411bcca36ee.zip | |
[PGO] Use WeakAny linkage for __llvm_profile_raw_version
Use WeakAny linkage instead of LinkOnceAny, as the symbol can be removed with
LinkOnceAny in O2 (not referenced).
llvm-svn: 269146
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp index e5e798b3fd0..6ec36319e3e 100644 --- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -771,7 +771,7 @@ static void createIRLevelProfileFlagVariable(Module &M) { IRLevelVersionVariable->setVisibility(GlobalValue::DefaultVisibility); Triple TT(M.getTargetTriple()); if (TT.isOSBinFormatMachO()) - IRLevelVersionVariable->setLinkage(GlobalValue::LinkOnceAnyLinkage); + IRLevelVersionVariable->setLinkage(GlobalValue::WeakAnyLinkage); else IRLevelVersionVariable->setComdat(M.getOrInsertComdat( StringRef(INSTR_PROF_QUOTE(IR_LEVEL_PROF_VERSION_VAR)))); |

