diff options
author | Mike Stump <mrs@apple.com> | 2009-09-22 02:12:52 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-09-22 02:12:52 +0000 |
commit | 2114d7c299fe38272302c587d60034d0720882d3 (patch) | |
tree | b20a8408f58a1e2d54a7ecacf6f87e68e43e4543 /clang/lib/CodeGen/CGBlocks.cpp | |
parent | 0356483539b10c8add2b45921372248f4d186fb1 (diff) | |
download | bcm5719-llvm-2114d7c299fe38272302c587d60034d0720882d3.tar.gz bcm5719-llvm-2114d7c299fe38272302c587d60034d0720882d3.zip |
Improve debug info generation for __block variables.
llvm-svn: 82508
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 41b49c7d7ef..8ed1f901c6b 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -218,9 +218,12 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) { llvm::Value* Addr = Builder.CreateStructGEP(V, i+5, "tmp"); NoteForHelper[helpersize].index = i+5; - NoteForHelper[helpersize].RequiresCopying = BlockRequiresCopying(VD->getType()); + NoteForHelper[helpersize].RequiresCopying + = BlockRequiresCopying(VD->getType()); NoteForHelper[helpersize].flag - = VD->getType()->isBlockPointerType() ? BLOCK_FIELD_IS_BLOCK : BLOCK_FIELD_IS_OBJECT; + = (VD->getType()->isBlockPointerType() + ? BLOCK_FIELD_IS_BLOCK + : BLOCK_FIELD_IS_OBJECT); if (LocalDeclMap[VD]) { if (BDRE->isByRef()) { @@ -386,6 +389,10 @@ const llvm::Type *BlockModule::getGenericExtendedBlockLiteralType() { return GenericExtendedBlockLiteralType; } +bool BlockFunction::BlockRequiresCopying(QualType Ty) { + return CGM.BlockRequiresCopying(Ty); +} + RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E) { const BlockPointerType *BPT = E->getCallee()->getType()->getAs<BlockPointerType>(); |