[cfe-commits] r98204 - /cfe/trunk/lib/CodeGen/CGDecl.cpp

Chris Lattner sabre at nondot.org
Wed Mar 10 15:59:59 PST 2010


Author: lattner
Date: Wed Mar 10 17:59:59 2010
New Revision: 98204

URL: http://llvm.org/viewvc/llvm-project?rev=98204&view=rev
Log:
set alignment on static locals properly, patch by Arnaud de Grandmaison!

Modified:
    cfe/trunk/lib/CodeGen/CGDecl.cpp

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=98204&r1=98203&r2=98204&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Wed Mar 10 17:59:59 2010
@@ -211,6 +211,8 @@
   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();





More information about the cfe-commits mailing list