mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00
21 lines
700 B
Objective-C
21 lines
700 B
Objective-C
// RUN: %clang_cc1 -fobjc-arc -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
|
|
|
|
@interface NSMutableArray
|
|
- (id)objectAtIndexedSubscript:(int)index;
|
|
- (void)setObject:(id)object atIndexedSubscript:(int)index;
|
|
@end
|
|
|
|
id func(void) {
|
|
NSMutableArray *array;
|
|
array[3] = 0;
|
|
return array[3];
|
|
}
|
|
|
|
// CHECK: [[call:%.*]] = call ptr @objc_msgSend
|
|
// CHECK: [[SIX:%.*]] = notail call ptr @llvm.objc.retainAutoreleasedReturnValue(ptr [[call]]) [[NUW:#[0-9]+]]
|
|
// CHECK: call void @llvm.objc.storeStrong(ptr {{%.*}}, ptr null)
|
|
// CHECK: [[EIGHT:%.*]] = tail call ptr @llvm.objc.autoreleaseReturnValue(ptr [[SIX]]) [[NUW]]
|
|
// CHECK: ret ptr [[EIGHT]]
|
|
|
|
// CHECK: attributes [[NUW]] = { nounwind }
|