From: Chris Lattner Date: Sat, 4 Dec 2004 18:54:48 +0000 (+0000) Subject: Fix linkage of mismatched weak globals. This unbreaks 300.twolf X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c8ef1edc63508d21bf8e38112fc125cde01fdbb9;p=oota-llvm.git 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 --- 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,