From 6eef49819da450de398dcbe008066ccc9546ee31 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Sun, 22 Feb 2009 13:55:31 +0000 Subject: [PATCH] Copy some clenaups from Eli to code that I copied. :-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65286 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index cffa7fa5ec..8bda453ee7 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -293,12 +293,7 @@ public: } uint64_t getBlockOffset(ValueDecl *D) { uint64_t Size = getContext().getTypeSize(D->getType()) / 8; - - unsigned Align = getContext().getTypeAlign(D->getType()); - if (const AlignedAttr* AA = D->getAttr()) - Align = std::max(Align, AA->getAlignment()); - - return getBlockOffset(Size, Align); + return getBlockOffset(Size, getContext().getDeclAlignInBytes(D)*8); } std::map BlockDecls; -- 2.40.0