Cleanp code with some recent suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 63aa4e0..a271e76 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -616,14 +616,8 @@
 
   // See if we have already allocated an offset for this variable.
   if (offset == 0) {
-    int Size = CGF.CGM.getTargetData().getTypeStoreSizeInBits(Ty) / 8;
-
-    unsigned Align = CGF.CGM.getContext().getTypeAlign(E->getDecl()->getType());
-    if (const AlignedAttr* AA = E->getDecl()->getAttr<AlignedAttr>())
-        Align = std::max(Align, AA->getAlignment());
-
     // if not, allocate one now.
-    offset = CGF.getBlockOffset(Size, Align);
+    offset = CGF.getBlockOffset(E->getDecl());
   }
 
   llvm::Value *BlockLiteral = CGF.LoadBlockStruct();