1 // RUN: %clang_cc1 -fobjc-arc -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s 2 3 @interface NSMutableArray 4 - (id)objectAtIndexedSubscript:(int)index; 5 - (void)setObject:(id)object atIndexedSubscript:(int)index; 6 @end 7 8 id func() { 9 NSMutableArray *array; 10 array[3] = 0; 11 return array[3]; 12 } 13 14 // CHECK: [[call:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend 15 // CHECK: [[SIX:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[call]]) nounwind 16 // CHECK: [[ARRAY:%.*]] = load %0** 17 // CHECK: [[ARRAY_CASTED:%.*]] = bitcast{{.*}}[[ARRAY]] to i8* 18 // CHECK: call void @objc_release(i8* [[ARRAY_CASTED]]) 19 // CHECK: [[EIGHT:%.*]] = call i8* @objc_autoreleaseReturnValue(i8* [[SIX]]) nounwind 20 // CHECK: ret i8* [[EIGHT]] 21 22