summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index c5d1240a2ff..d58acbec81c 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -531,6 +531,8 @@ static bool LinkGlobals(Module *Dest, Module *Src,
else
DGV->setConstant(true);
}
+ SGV->setLinkage(GlobalValue::ExternalLinkage);
+ SGV->setInitializer(0);
}
ValueMap.insert(std::make_pair(SGV,
OpenPOWER on IntegriCloud