diff options
author | John McCall <rjmccall@apple.com> | 2011-07-12 00:15:30 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-07-12 00:15:30 +0000 |
commit | 5fcf8da33dfb9a54f047718223ddba16a263f6c1 (patch) | |
tree | 75ba783c9f84f57aaa7c8e5e0c1f667c1fe83d89 /clang/lib/CodeGen/CGObjC.cpp | |
parent | cdc2297ee1475125b2b55edb61df14b722c2cc10 (diff) | |
download | bcm5719-llvm-5fcf8da33dfb9a54f047718223ddba16a263f6c1.tar.gz bcm5719-llvm-5fcf8da33dfb9a54f047718223ddba16a263f6c1.zip |
Do full-expression cleanups in a much more sensible way that still lets
people write useful cleanup classes.
llvm-svn: 134942
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 2f0d827fc3b..8ea481f23a5 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -1902,23 +1902,6 @@ namespace { CallReleaseForObject(QualType type, llvm::Value *addr, CodeGenFunction::Destroyer *destroyer) : ObjCReleasingCleanup(type, addr, destroyer) {} - - using ObjCReleasingCleanup::Emit; - static void Emit(CodeGenFunction &CGF, bool IsForEH, - QualType type, llvm::Value *addr, - CodeGenFunction::Destroyer *destroyer) { - // EHScopeStack::Cleanup objects can never have their destructors called, - // so use placement new to construct our temporary object. - union { - void* align; - char data[sizeof(CallReleaseForObject)]; - }; - - CallReleaseForObject *Object - = new (&align) CallReleaseForObject(type, addr, destroyer); - Object->Emit(CGF, IsForEH); - (void)data[0]; - } }; /// A cleanup that calls @objc_storeStrong(nil) on all the objects to @@ -1965,22 +1948,6 @@ namespace { struct CallWeakReleaseForObject : ObjCReleasingCleanup { CallWeakReleaseForObject(QualType type, llvm::Value *addr) : ObjCReleasingCleanup(type, addr, CodeGenFunction::destroyARCWeak) {} - - using ObjCReleasingCleanup::Emit; - static void Emit(CodeGenFunction &CGF, bool IsForEH, - QualType type, llvm::Value *addr) { - // EHScopeStack::Cleanup objects can never have their destructors called, - // so use placement new to construct our temporary object. - union { - void* align; - char data[sizeof(CallWeakReleaseForObject)]; - }; - - CallWeakReleaseForObject *Object - = new (&align) CallWeakReleaseForObject(type, addr); - Object->Emit(CGF, IsForEH); - (void)data[0]; - } }; |