diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-03-29 23:05:41 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-03-29 23:05:41 +0000 |
commit | 75c7563f834b06cfc71ef53bd4c37e58d2d96ff6 (patch) | |
tree | b2586ee80f666a4867c7aa6b93c167cc40a5bdbf /lib/Linker/LinkModules.cpp | |
parent | 55037def6b7d850eb4cdefb8e27575e96562b483 (diff) |
We need to copy over the unnamed_addr attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker/LinkModules.cpp')
-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..c11aefbfa1 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -352,6 +352,7 @@ static void CopyGVAttributes(GlobalValue *DestGV, const GlobalValue *SrcGV) { unsigned Alignment = std::max(DestGV->getAlignment(), SrcGV->getAlignment()); DestGV->copyAttributesFrom(SrcGV); DestGV->setAlignment(Alignment); + DestGV->setUnnamedAddr(SrcGV->hasUnnamedAddr()); } /// GetLinkageResult - This analyzes the two global values and determines what |