From 75c7563f834b06cfc71ef53bd4c37e58d2d96ff6 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 29 Mar 2011 23:05:41 +0000 Subject: [PATCH] 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 --- lib/Linker/LinkModules.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 5aa06abdd98..c11aefbfa11 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