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 | 4d941099035522ded975b6392a64fa9663af317e (patch) | |
| tree | 5bdb3308930527bfb03625624a7a2d266be6978b /clang/lib/CodeGen | |
| parent | 4ec0b670d5f4d5f4f404cd433b83dccb7b2b005e (diff) | |
| download | bcm5719-llvm-4d941099035522ded975b6392a64fa9663af317e.tar.gz bcm5719-llvm-4d941099035522ded975b6392a64fa9663af317e.zip | |
set alignment on static locals properly, patch by Arnaud de Grandmaison!
llvm-svn: 98204
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 793a2205067..371adad718b 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/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(); |

