summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/LTO.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 6d2be054813..ab97079bbd8 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -83,13 +83,12 @@ void BitcodeCompiler::add(BitcodeFile &F) {
continue;
}
if (!BitcodeFile::shouldSkip(Sym)) {
-
- if (GV->getLinkage() == llvm::GlobalValue::LinkOnceODRLinkage)
- GV->setLinkage(GlobalValue::WeakODRLinkage);
-
if (SymbolBody *B = Bodies[BodyIndex++])
- if (&B->repl() == B && isa<DefinedBitcode>(B))
+ if (&B->repl() == B && isa<DefinedBitcode>(B)) {
+ if (GV->getLinkage() == llvm::GlobalValue::LinkOnceODRLinkage)
+ GV->setLinkage(GlobalValue::WeakODRLinkage);
Keep.push_back(GV);
+ }
}
}
OpenPOWER on IntegriCloud