diff options
Diffstat (limited to 'lib/Linker')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index eed36c1..5545af6 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... |