diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-05-14 12:11:51 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-05-14 12:11:51 +0000 | 
| commit | f41464618f41b92cf0a0bd14ccc57bce727fb33d (patch) | |
| tree | 627f8f0778b9c9f1b18087a696d1890b129f6e7b /lib/Transforms/Utils/Linker.cpp | |
| parent | e0c60038ebf0d259b28954a380adcbed9b5a39ee (diff) | |
Fix major problem with appending linkage changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Linker.cpp')
| -rw-r--r-- | lib/Transforms/Utils/Linker.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/Linker.cpp b/lib/Transforms/Utils/Linker.cpp index 13afe1fa93..c4d4fc64ce 100644 --- a/lib/Transforms/Utils/Linker.cpp +++ b/lib/Transforms/Utils/Linker.cpp @@ -597,7 +597,8 @@ bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {    // Add all of the appending globals already in the Dest module to    // AppendingVars.    for (Module::giterator I = Dest->gbegin(), E = Dest->gend(); I != E; ++I) -    AppendingVars.insert(std::make_pair(I->getName(), I)); +    if (I->hasAppendingLinkage()) +      AppendingVars.insert(std::make_pair(I->getName(), I));    // Insert all of the globals in src into the Dest module... without linking    // initializers (which could refer to functions not yet mapped over).  | 
