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 | 985bef24d1a97da3fdbd422f7b96a2eead707541 (patch) | |
tree | a045479a7774090650e4f7c0ab19f88e9cde6790 /llvm/lib/Linker/LinkModules.cpp | |
parent | c5bcda46193ffe8549a546e01e071da18402113a (diff) | |
download | bcm5719-llvm-985bef24d1a97da3fdbd422f7b96a2eead707541.tar.gz bcm5719-llvm-985bef24d1a97da3fdbd422f7b96a2eead707541.zip |
We need to copy over the unnamed_addr attribute.
llvm-svn: 128501
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index 5aa06abdd98..c11aefbfa11 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/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 |