aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-09-09 02:51:03 +0000
committerAnders Carlsson <andersca@mac.com>2009-09-09 02:51:03 +0000
commit9ad5513b0f9d3999705659fb1aeb0e6c53455f43 (patch)
tree99f07d766725dcb18a205560930b8b274d3c81f5 /lib/CodeGen/CGBlocks.cpp
parent3dab34a7cb5e2ad9c2311fc44b3d3b7ebb540992 (diff)
Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index 5156d488e2..d180820ab4 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/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;