]> granicus.if.org Git - clang/commitdiff
Fix <rdar://problem/6435837> clang ObjC rewriter: use Block_release instead of Block_...
authorSteve Naroff <snaroff@apple.com>
Fri, 12 Dec 2008 21:05:34 +0000 (21:05 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 12 Dec 2008 21:05:34 +0000 (21:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60962 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteObjC.cpp

index 5b7fce3c9dedc06867a9289b1b8fb3720e75c1e5..aaaa0c6689858fb8e16913d72e0aa6d5d66cd9b1 100644 (file)
@@ -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<ValueDecl*,8>::iterator I = ImportedBlockDecls.begin(), 
       E = ImportedBlockDecls.end(); I != E; ++I) {
-    S += "_Block_destroy((void*)src->";
+    S += "_Block_release((void*)src->";
     S += (*I)->getNameAsString();
     S += ");";
   }