summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-04 18:54:48 +0000
committerChris Lattner <sabre@nondot.org>2004-12-04 18:54:48 +0000
commita57c1056879c5cdcb485db14e88301148a1e64ad (patch)
tree4214cacaf52f6116bdb3c308787a410640e82944 /llvm/lib
parent9cb0f7097c4c57e38c7c685460a4eea97fa789ed (diff)
downloadbcm5719-llvm-a57c1056879c5cdcb485db14e88301148a1e64ad.tar.gz
bcm5719-llvm-a57c1056879c5cdcb485db14e88301148a1e64ad.zip
Fix linkage of mismatched weak globals. This unbreaks 300.twolf
llvm-svn: 18494
Diffstat (limited to 'llvm/lib')
-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