diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-10 23:59:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-10 23:59:59 +0000 |
commit | 0af9523607754a945b49d8a1ebae6631fc927921 (patch) | |
tree | e5c5114e98e6c4ac50c034883c751226defda871 /lib/CodeGen/CGDecl.cpp | |
parent | e3bdbee47059839d5e24acab5ee7b925285f573e (diff) |
set alignment on static locals properly, patch by Arnaud de Grandmaison!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 793a220506..371adad718 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -211,6 +211,8 @@ void CodeGenFunction::EmitStaticBlockVarDecl(const VarDecl &D, if (D.getInit()) GV = AddInitializerToGlobalBlockVarDecl(D, GV); + GV->setAlignment(getContext().getDeclAlign(&D).getQuantity()); + // FIXME: Merge attribute handling. if (const AnnotateAttr *AA = D.getAttr<AnnotateAttr>()) { SourceManager &SM = CGM.getContext().getSourceManager(); |