From: Steve Naroff Date: Fri, 12 Dec 2008 21:05:34 +0000 (+0000) Subject: Fix clang ObjC rewriter: use Block_release instead of Block_... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2badf1ee2872327c2f1a54db997bc6bfb4a908dc;p=clang Fix clang ObjC rewriter: use Block_release instead of Block_destroy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60962 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp index 5b7fce3c9d..aaaa0c6689 100644 --- a/Driver/RewriteObjC.cpp +++ b/Driver/RewriteObjC.cpp @@ -540,7 +540,7 @@ void RewriteObjC::Initialize(ASTContext &context) { Preamble += "// Runtime copy/destroy helper functions\n"; Preamble += "__OBJC_RW_STATICIMPORT void _Block_copy_assign(void *, void *);\n"; Preamble += "__OBJC_RW_STATICIMPORT void _Block_byref_assign_copy(void *, void *);\n"; - Preamble += "__OBJC_RW_STATICIMPORT void _Block_destroy(void *);\n"; + Preamble += "__OBJC_RW_STATICIMPORT void _Block_release(void *);\n"; Preamble += "__OBJC_RW_STATICIMPORT void _Block_byref_release(void *);\n"; Preamble += "__OBJC_RW_STATICIMPORT void *_NSConcreteGlobalBlock;\n"; Preamble += "__OBJC_RW_STATICIMPORT void *_NSConcreteStackBlock;\n"; @@ -3529,7 +3529,7 @@ std::string RewriteObjC::SynthesizeBlockHelperFuncs(BlockExpr *CE, int i, S += "*src) {"; for (llvm::SmallPtrSet::iterator I = ImportedBlockDecls.begin(), E = ImportedBlockDecls.end(); I != E; ++I) { - S += "_Block_destroy((void*)src->"; + S += "_Block_release((void*)src->"; S += (*I)->getNameAsString(); S += ");"; }