summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-03-07 18:34:50 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-03-07 18:34:50 +0000
commit75c7915c3a24f8063c274ccffe2dc9b7bc8bce1f (patch)
treecf4fe7176ec4f92ca00d7b3e209d89c18c68a0d2 /lib/Linker
parente20c814518e3322f5bf5f83e9ca42bd6bdd40745 (diff)
downloadllvm-75c7915c3a24f8063c274ccffe2dc9b7bc8bce1f.tar.gz
llvm-75c7915c3a24f8063c274ccffe2dc9b7bc8bce1f.tar.bz2
llvm-75c7915c3a24f8063c274ccffe2dc9b7bc8bce1f.tar.xz
Clarify some important bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index eed36c1674..5545af69f1 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -516,8 +516,9 @@ static bool LinkGlobals(Module *Dest, Module *Src,
SGV->isConstant(), SGV->getLinkage(), /*init*/0,
"", Dest);
- // Propagate alignment, section and visibility info.
+ // Set alignment allowing CopyGVAttributes merge it with alignment of SGV.
NewDGV->setAlignment(DGV->getAlignment());
+ // Propagate alignment, section and visibility info.
CopyGVAttributes(NewDGV, SGV);
// Make sure to remember this mapping...