diff options
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 7 |
1 files changed, 1 insertions, 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<AlignedAttr>()) - Align = std::max(Align, AA->getAlignment()); - - return getBlockOffset(Size, Align); + return getBlockOffset(Size, getContext().getDeclAlignInBytes(D)*8); } std::map<Decl*, uint64_t> BlockDecls; |