mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Use an early return. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223470 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1028,30 +1028,30 @@ bool ModuleLinker::linkGlobalValueProto(GlobalValue *SGV) {
|
|||||||
else
|
else
|
||||||
NewGV = linkGlobalAliasProto(cast<GlobalAlias>(SGV), DGV, LinkFromSrc);
|
NewGV = linkGlobalAliasProto(cast<GlobalAlias>(SGV), DGV, LinkFromSrc);
|
||||||
|
|
||||||
if (NewGV) {
|
if (!NewGV)
|
||||||
if (NewGV != DGV)
|
return false;
|
||||||
copyGVAttributes(NewGV, SGV);
|
|
||||||
|
|
||||||
NewGV->setUnnamedAddr(HasUnnamedAddr);
|
if (NewGV != DGV)
|
||||||
NewGV->setVisibility(Visibility);
|
copyGVAttributes(NewGV, SGV);
|
||||||
|
|
||||||
if (auto *NewGO = dyn_cast<GlobalObject>(NewGV)) {
|
NewGV->setUnnamedAddr(HasUnnamedAddr);
|
||||||
if (C)
|
NewGV->setVisibility(Visibility);
|
||||||
NewGO->setComdat(C);
|
|
||||||
|
|
||||||
if (DGV && DGV->hasCommonLinkage() && SGV->hasCommonLinkage())
|
if (auto *NewGO = dyn_cast<GlobalObject>(NewGV)) {
|
||||||
NewGO->setAlignment(std::max(DGV->getAlignment(), SGV->getAlignment()));
|
if (C)
|
||||||
}
|
NewGO->setComdat(C);
|
||||||
|
|
||||||
// Make sure to remember this mapping.
|
if (DGV && DGV->hasCommonLinkage() && SGV->hasCommonLinkage())
|
||||||
if (NewGV != DGV) {
|
NewGO->setAlignment(std::max(DGV->getAlignment(), SGV->getAlignment()));
|
||||||
if (DGV) {
|
}
|
||||||
DGV->replaceAllUsesWith(
|
|
||||||
ConstantExpr::getBitCast(NewGV, DGV->getType()));
|
// Make sure to remember this mapping.
|
||||||
DGV->eraseFromParent();
|
if (NewGV != DGV) {
|
||||||
}
|
if (DGV) {
|
||||||
ValueMap[SGV] = NewGV;
|
DGV->replaceAllUsesWith(ConstantExpr::getBitCast(NewGV, DGV->getType()));
|
||||||
|
DGV->eraseFromParent();
|
||||||
}
|
}
|
||||||
|
ValueMap[SGV] = NewGV;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user