From 20733cd4fd5c9755cdfab583db862223c93732c8 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Sun, 22 Feb 2009 13:27:11 +0000 Subject: Cleanp code with some recent suggestions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 63aa4e0a20..a271e76bf1 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -616,14 +616,8 @@ Value *ScalarExprEmitter::VisitBlockDeclRefExpr(BlockDeclRefExpr *E) { // 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()) - 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(); -- cgit v1.2.3