diff options
| author | Mike Stump <mrs@apple.com> | 2009-02-22 13:55:31 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-02-22 13:55:31 +0000 |
| commit | e8b2d066ea944fbd3dfe2baf3b7b94c4d7f41b19 (patch) | |
| tree | cfc6006b56e44abfbc214788d7f432e9e097d7f0 /clang/lib | |
| parent | 624497c29a4c2a81f31aac386f276cf14febfb13 (diff) | |
| download | bcm5719-llvm-e8b2d066ea944fbd3dfe2baf3b7b94c4d7f41b19.tar.gz bcm5719-llvm-e8b2d066ea944fbd3dfe2baf3b7b94c4d7f41b19.zip | |
Copy some clenaups from Eli to code that I copied. :-)
llvm-svn: 65286
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index cffa7fa5ec1..8bda453ee72 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/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; |

