[llvm] r223424 - linkGlobalVariableProto never returns null. Simplify the caller. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Thu Dec 4 16:30:47 PST 2014
Author: rafael
Date: Thu Dec 4 18:30:47 2014
New Revision: 223424
URL: http://llvm.org/viewvc/llvm-project?rev=223424&view=rev
Log:
linkGlobalVariableProto never returns null. Simplify the caller. NFC.
Modified:
llvm/trunk/lib/Linker/LinkModules.cpp
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=223424&r1=223423&r2=223424&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Thu Dec 4 18:30:47 2014
@@ -1021,15 +1021,12 @@ bool ModuleLinker::linkGlobalValueProto(
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)
More information about the llvm-commits
mailing list