summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 738791d7e56..5b2d425c805 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -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)
OpenPOWER on IntegriCloud