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