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.h | |
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.h')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.h b/clang/lib/CodeGen/CGBlocks.h index 6309e1d87d8..8557d1f83bf 100644 --- a/clang/lib/CodeGen/CGBlocks.h +++ b/clang/lib/CodeGen/CGBlocks.h @@ -115,6 +115,16 @@ public: PtrToInt8Ty = llvm::PointerType::getUnqual( llvm::Type::getInt8Ty(M.getContext())); } + + bool BlockRequiresCopying(QualType Ty) { + if (Ty->isBlockPointerType()) + return true; + if (getContext().isObjCNSObjectType(Ty)) + return true; + if (Ty->isObjCObjectPointerType()) + return true; + return false; + } }; class BlockFunction : public BlockBase { @@ -219,15 +229,7 @@ public: llvm::Value *getBlockObjectDispose(); void BuildBlockRelease(llvm::Value *DeclPtr, int flag = BLOCK_FIELD_IS_BYREF); - bool BlockRequiresCopying(QualType Ty) { - if (Ty->isBlockPointerType()) - return true; - if (getContext().isObjCNSObjectType(Ty)) - return true; - if (Ty->isObjCObjectPointerType()) - return true; - return false; - } + bool BlockRequiresCopying(QualType Ty); }; } // end namespace CodeGen |