diff options
| author | Anders Carlsson <andersca@mac.com> | 2009-09-09 02:51:03 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2009-09-09 02:51:03 +0000 |
| commit | 71d1d92d3728302dcd64a657bcded445eb3d9b77 (patch) | |
| tree | 86f856207a8ccbc2d473f944a7df94a245ca6b57 /clang/lib/CodeGen/CGBlocks.cpp | |
| parent | d556bc48d7b2a7792bcd908ed278c9cbe81b99f5 (diff) | |
| download | bcm5719-llvm-71d1d92d3728302dcd64a657bcded445eb3d9b77.tar.gz bcm5719-llvm-71d1d92d3728302dcd64a657bcded445eb3d9b77.zip | |
Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.
llvm-svn: 81315
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 5156d488e2b..d180820ab4f 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -185,8 +185,7 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) { const BlockDeclRefExpr *BDRE = dyn_cast<BlockDeclRefExpr>(E); QualType Ty = E->getType(); if (BDRE && BDRE->isByRef()) { - uint64_t Align = getContext().getDeclAlignInBytes(BDRE->getDecl()); - Types[i+5] = llvm::PointerType::get(BuildByRefType(Ty, Align), 0); + Types[i+5] = llvm::PointerType::get(BuildByRefType(BDRE->getDecl()), 0); } else Types[i+5] = ConvertType(Ty); } @@ -464,9 +463,8 @@ llvm::Value *CodeGenFunction::GetAddrOfBlockDecl(const BlockDeclRefExpr *E) { "block.literal"); if (E->isByRef()) { bool needsCopyDispose = BlockRequiresCopying(E->getType()); - uint64_t Align = getContext().getDeclAlignInBytes(E->getDecl()); const llvm::Type *PtrStructTy - = llvm::PointerType::get(BuildByRefType(E->getType(), Align), 0); + = llvm::PointerType::get(BuildByRefType(E->getDecl()), 0); // The block literal will need a copy/destroy helper. BlockHasCopyDispose = true; Ty = PtrStructTy; |

