diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-13 05:12:34 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-13 05:12:34 +0000 |
commit | c2a94da3134fcd5745f1b852af6b4ade7b57b4d3 (patch) | |
tree | 1dab0c0a72771af3dcf4632f4435c539edcadd46 /lib/Linker | |
parent | d72479c2f061e3b57adf3d054875665f25a30d90 (diff) | |
download | external_llvm-c2a94da3134fcd5745f1b852af6b4ade7b57b4d3.zip external_llvm-c2a94da3134fcd5745f1b852af6b4ade7b57b4d3.tar.gz external_llvm-c2a94da3134fcd5745f1b852af6b4ade7b57b4d3.tar.bz2 |
Keep unnamed_addr when linking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 3b3d3a4..4b4c72b 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -352,6 +352,8 @@ static void CopyGVAttributes(GlobalValue *DestGV, const GlobalValue *SrcGV) { unsigned Alignment = std::max(DestGV->getAlignment(), SrcGV->getAlignment()); DestGV->copyAttributesFrom(SrcGV); DestGV->setAlignment(Alignment); + if (SrcGV->hasUnnamedAddr()) + DestGV->setUnnamedAddr(true); } /// GetLinkageResult - This analyzes the two global values and determines what |