diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-03-29 23:31:06 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-03-29 23:31:06 +0000 |
commit | 87fa8d12b49621a28ca0bda7a480531608df80c8 (patch) | |
tree | 75846a91b67f3e554d44ecccfad748e064b648a1 /lib/Linker | |
parent | 5f49c296127d41636a3b0466d64684c7c46ef45d (diff) |
Set the unnamed_addr only when we're creating a new GV in the dest module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 5aa06abdd9..f372db2403 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -505,6 +505,7 @@ static bool LinkGlobals(Module *Dest, const Module *Src, SGV->getType()->getAddressSpace()); // Propagate alignment, visibility and section info. CopyGVAttributes(NewDGV, SGV); + NewDGV->setUnnamedAddr(SGV->hasUnnamedAddr()); // If the LLVM runtime renamed the global, but it is an externally visible // symbol, DGV must be an existing global with internal linkage. Rename |