mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-26 06:14:42 +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:
parent
52978c2adf
commit
7eaee304ab
@ -1021,15 +1021,12 @@ bool ModuleLinker::linkGlobalValueProto(GlobalValue *SGV) {
|
||||
return false;
|
||||
|
||||
GlobalValue *NewGV;
|
||||
if (auto *SGVar = dyn_cast<GlobalVariable>(SGV)) {
|
||||
if (auto *SGVar = dyn_cast<GlobalVariable>(SGV))
|
||||
NewGV = linkGlobalVariableProto(SGVar, DGV, LinkFromSrc);
|
||||
if (!NewGV)
|
||||
return true;
|
||||
} else if (auto *SF = dyn_cast<Function>(SGV)) {
|
||||
else if (auto *SF = dyn_cast<Function>(SGV))
|
||||
NewGV = linkFunctionProto(SF, DGV, LinkFromSrc);
|
||||
} else {
|
||||
else
|
||||
NewGV = linkGlobalAliasProto(cast<GlobalAlias>(SGV), DGV, LinkFromSrc);
|
||||
}
|
||||
|
||||
if (NewGV) {
|
||||
if (NewGV != DGV)
|
||||
|
Loading…
x
Reference in New Issue
Block a user