summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-03-29 23:05:41 +0000
committerBill Wendling <isanbard@gmail.com>2011-03-29 23:05:41 +0000
commit75c7563f834b06cfc71ef53bd4c37e58d2d96ff6 (patch)
treeb2586ee80f666a4867c7aa6b93c167cc40a5bdbf /lib/Linker
parent55037def6b7d850eb4cdefb8e27575e96562b483 (diff)
downloadllvm-75c7563f834b06cfc71ef53bd4c37e58d2d96ff6.tar.gz
llvm-75c7563f834b06cfc71ef53bd4c37e58d2d96ff6.tar.bz2
llvm-75c7563f834b06cfc71ef53bd4c37e58d2d96ff6.tar.xz
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')
-rw-r--r--lib/Linker/LinkModules.cpp1
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