summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.h')
-rw-r--r--clang/lib/CodeGen/CGBlocks.h20
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
OpenPOWER on IntegriCloud