diff options
author | Mike Stump <mrs@apple.com> | 2009-10-21 18:23:01 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-10-21 18:23:01 +0000 |
commit | 41eb02d4966ca8d9f8cb9dcaaf7490f674c684d9 (patch) | |
tree | 97f86b4931457cfa6faf9d1130804defc6c742af /clang/lib/CodeGen/CGBlocks.h | |
parent | 9496790211a6c4c398c55bfd8cac370a4ef4c835 (diff) | |
download | bcm5719-llvm-41eb02d4966ca8d9f8cb9dcaaf7490f674c684d9.tar.gz bcm5719-llvm-41eb02d4966ca8d9f8cb9dcaaf7490f674c684d9.zip |
Refactor.
llvm-svn: 84769
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.h')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.h b/clang/lib/CodeGen/CGBlocks.h index 48807af2094..3ab4efb71be 100644 --- a/clang/lib/CodeGen/CGBlocks.h +++ b/clang/lib/CodeGen/CGBlocks.h @@ -115,15 +115,8 @@ public: PtrToInt8Ty = llvm::Type::getInt8PtrTy(M.getContext()); } - 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) + { return getContext().BlockRequiresCopying(Ty); } }; class BlockFunction : public BlockBase { @@ -224,7 +217,8 @@ public: llvm::Value *getBlockObjectDispose(); void BuildBlockRelease(llvm::Value *DeclPtr, int flag = BLOCK_FIELD_IS_BYREF); - bool BlockRequiresCopying(QualType Ty); + bool BlockRequiresCopying(QualType Ty) + { return getContext().BlockRequiresCopying(Ty); } }; } // end namespace CodeGen |