From: Mike Stump Date: Sun, 22 Feb 2009 13:55:31 +0000 (+0000) Subject: Copy some clenaups from Eli to code that I copied. :-) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eef49819da450de398dcbe008066ccc9546ee31;p=clang 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 --- 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;