aboutsummaryrefslogtreecommitdiff
path: root/lib/Linker/LinkModules.cpp
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
commitc8ef1edc63508d21bf8e38112fc125cde01fdbb9 (patch)
tree2a9c703fd536f6a2fc79e5b12b4edb5abb14b0b6 /lib/Linker/LinkModules.cpp
parent3149ba7a65dca988a715db7dcf31aa0e73a56a4e (diff)
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
Diffstat (limited to 'lib/Linker/LinkModules.cpp')
-rw-r--r--lib/Linker/LinkModules.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index c5d1240a2f..d58acbec81 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,