aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-07-12 00:15:30 +0000
committerJohn McCall <rjmccall@apple.com>2011-07-12 00:15:30 +0000
commitc4a1a8450a3613ef256a71b9d8305b41f79eef50 (patch)
treeb3b71e31cbd4e1c9b72d17514c3bb8d21daa000e /lib/CodeGen/CGObjC.cpp
parente02d391ffef647ba0d48b85e211a94d9fb83393f (diff)
Do full-expression cleanups in a much more sensible way that still lets
people write useful cleanup classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r--lib/CodeGen/CGObjC.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index 2f0d827fc3..8ea481f23a 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/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];
- }
};