FunctionDecl::Static, false,
true);
CGF.StartFunction(FD, R, Fn, Args, SourceLocation());
- // EmitStmt(BExpr->getBody());
+ // BuildBlockRelease(Src, flag);
CGF.FinishFunction();
return llvm::ConstantExpr::getBitCast(Fn, PtrToInt8Ty);
return CGM.BlockObjectDispose;
}
-void BlockFunction::BuildBlockRelease(const VarDecl &D, llvm::Value *DeclPtr) {
+void BlockFunction::BuildBlockRelease(llvm::Value *DeclPtr) {
llvm::Value *F = getBlockObjectDispose();
llvm::Value *N, *V;
V = Builder.CreateStructGEP(DeclPtr, 1, "forwarding");
llvm::Constant *BuildbyrefDestroyHelper(int flag);
llvm::Value *getBlockObjectDispose();
- void BuildBlockRelease(const VarDecl &D, llvm::Value *DeclPtr);
+ void BuildBlockRelease(llvm::Value *DeclPtr);
bool BlockRequiresCopying(QualType Ty) {
if (Ty->isBlockPointerType())
if (needsDispose && CGM.getLangOptions().getGCMode() != LangOptions::GCOnly) {
CleanupScope scope(*this);
- BuildBlockRelease(D, DeclPtr);
+ BuildBlockRelease(DeclPtr);
}
}