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
This commit is contained in:
Bill Wendling 2011-03-29 23:05:41 +00:00
parent 55037def6b
commit 75c7563f83

View File

@ -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