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,7 +1028,9 @@ 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)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (NewGV != DGV)
|
if (NewGV != DGV)
|
||||||
copyGVAttributes(NewGV, SGV);
|
copyGVAttributes(NewGV, SGV);
|
||||||
|
|
||||||
@@ -1046,13 +1048,11 @@ bool ModuleLinker::linkGlobalValueProto(GlobalValue *SGV) {
|
|||||||
// Make sure to remember this mapping.
|
// Make sure to remember this mapping.
|
||||||
if (NewGV != DGV) {
|
if (NewGV != DGV) {
|
||||||
if (DGV) {
|
if (DGV) {
|
||||||
DGV->replaceAllUsesWith(
|
DGV->replaceAllUsesWith(ConstantExpr::getBitCast(NewGV, DGV->getType()));
|
||||||
ConstantExpr::getBitCast(NewGV, DGV->getType()));
|
|
||||||
DGV->eraseFromParent();
|
DGV->eraseFromParent();
|
||||||
}
|
}
|
||||||
ValueMap[SGV] = NewGV;
|
ValueMap[SGV] = NewGV;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user