John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -fblocks -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s | FileCheck %s |
John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 2 | |
| 3 | // CHECK: define void @_Z28test_objc_object_pseudo_dtorPU8__strongP11objc_objectPU6__weakS0_ |
| 4 | void test_objc_object_pseudo_dtor(__strong id *ptr, __weak id *wptr) { |
| 5 | // CHECK: load i8*** |
| 6 | // CHECK-NEXT: load i8** |
| 7 | // CHECK-NEXT: call void @objc_release |
| 8 | ptr->~id(); |
| 9 | |
| 10 | // CHECK: call void @objc_destroyWeak(i8** {{%.*}}) |
| 11 | wptr->~id(); |
| 12 | |
| 13 | // CHECK: load i8*** |
| 14 | // CHECK-NEXT: load i8** |
| 15 | // CHECK-NEXT: call void @objc_release |
| 16 | (*ptr).~id(); |
| 17 | |
| 18 | // CHECK: call void @objc_destroyWeak(i8** {{%.*}}) |
| 19 | (*wptr).~id(); |
| 20 | // CHECK: ret void |
| 21 | } |