From bfb3671b25fd5c4fa52640fd583f84cfadf81fcd Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Thu, 24 Dec 2009 21:13:40 +0000 Subject: Pass the return value slot to all call exprs. llvm-svn: 92145 --- clang/lib/CodeGen/CGBlocks.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGBlocks.cpp') diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 2270f84b5be..1bece7fec6f 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -460,7 +460,8 @@ const llvm::Type *BlockModule::getGenericExtendedBlockLiteralType() { return GenericExtendedBlockLiteralType; } -RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E) { +RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E, + ReturnValueSlot ReturnValue) { const BlockPointerType *BPT = E->getCallee()->getType()->getAs(); @@ -509,7 +510,7 @@ RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E) { Func = Builder.CreateBitCast(Func, BlockFTyPtr); // And call the block. - return EmitCall(FnInfo, Func, ReturnValueSlot(), Args); + return EmitCall(FnInfo, Func, ReturnValue, Args); } uint64_t CodeGenFunction::AllocateBlockDecl(const BlockDeclRefExpr *E) { -- cgit v1.2.3