summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-02-22 13:27:11 +0000
committerMike Stump <mrs@apple.com>2009-02-22 13:27:11 +0000
commit20733cd4fd5c9755cdfab583db862223c93732c8 (patch)
tree0f348797e578bd16dd2b0f861b9c01595bec63a7 /lib/CodeGen/CGExprScalar.cpp
parent2217c87bdc5ab357046a5453bdb06f469c41024e (diff)
downloadclang-20733cd4fd5c9755cdfab583db862223c93732c8.tar.gz
clang-20733cd4fd5c9755cdfab583db862223c93732c8.tar.bz2
clang-20733cd4fd5c9755cdfab583db862223c93732c8.tar.xz
Cleanp code with some recent suggestions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--lib/CodeGen/CGExprScalar.cpp8
1 files changed, 1 insertions, 7 deletions
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<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();