From c8ef1edc63508d21bf8e38112fc125cde01fdbb9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 4 Dec 2004 18:54:48 +0000 Subject: [PATCH] Fix linkage of mismatched weak globals. This unbreaks 300.twolf git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18494 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index c5d1240a2ff..d58acbec81c 100644 --- a/lib/Linker/LinkModules.cpp +++ b/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,