mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
linkGlobalVariableProto never returns null. Simplify the caller. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223424 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1021,15 +1021,12 @@ bool ModuleLinker::linkGlobalValueProto(GlobalValue *SGV) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
GlobalValue *NewGV;
|
GlobalValue *NewGV;
|
||||||
if (auto *SGVar = dyn_cast<GlobalVariable>(SGV)) {
|
if (auto *SGVar = dyn_cast<GlobalVariable>(SGV))
|
||||||
NewGV = linkGlobalVariableProto(SGVar, DGV, LinkFromSrc);
|
NewGV = linkGlobalVariableProto(SGVar, DGV, LinkFromSrc);
|
||||||
if (!NewGV)
|
else if (auto *SF = dyn_cast<Function>(SGV))
|
||||||
return true;
|
|
||||||
} else if (auto *SF = dyn_cast<Function>(SGV)) {
|
|
||||||
NewGV = linkFunctionProto(SF, DGV, LinkFromSrc);
|
NewGV = linkFunctionProto(SF, DGV, LinkFromSrc);
|
||||||
} else {
|
else
|
||||||
NewGV = linkGlobalAliasProto(cast<GlobalAlias>(SGV), DGV, LinkFromSrc);
|
NewGV = linkGlobalAliasProto(cast<GlobalAlias>(SGV), DGV, LinkFromSrc);
|
||||||
}
|
|
||||||
|
|
||||||
if (NewGV) {
|
if (NewGV) {
|
||||||
if (NewGV != DGV)
|
if (NewGV != DGV)
|
||||||
|
Reference in New Issue
Block a user