From cf1b401909b5e54edfd80656b1a18eaa31f9f6f1 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:05 +0000 Subject: Vendor import of clang trunk r306956: https://llvm.org/svn/llvm-project/cfe/trunk@306956 --- test/CodeGenObjC/parameterized_classes.m | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/CodeGenObjC/parameterized_classes.m') diff --git a/test/CodeGenObjC/parameterized_classes.m b/test/CodeGenObjC/parameterized_classes.m index 8fe5c52b8d39..34aca35af313 100644 --- a/test/CodeGenObjC/parameterized_classes.m +++ b/test/CodeGenObjC/parameterized_classes.m @@ -96,3 +96,31 @@ void blockTest(NSMutableArray *array, NSString *name) { _destination = a; } @end + +// CHECK-LABEL: define internal void @"\01-[C0 foo1]"( +// CHECK: {{.*}} = alloca +// CHECK: {{.*}} = alloca +// CHECK: %[[D:.*]] = alloca %[[TY:.*]]* +// CHECK: %[[TEMP:.*]] = alloca %[[TY]]* +// CHECK: %[[V4:.*]] = load %[[TY]]*, %[[TY]]** %[[D]] +// CHECK: store %[[TY]]* %[[V4]], %[[TY]]** %[[TEMP]] +// CHECK: %[[V7:.*]] = bitcast %[[TY]]** %[[TEMP]] to i8** +// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8**)*)(i8* %{{.*}}, i8* %{{.*}}, i8** %[[V7]]) + +@interface P0 : NSObject +- (void)m0:(ObjectType *)first; +@end + +@interface C0 : NSObject +-(void)foo1; +@end + +@implementation C0 { + P0 *x; +} + +-(void)foo1 { + NSString *d; + [x m0:&d]; +} +@end -- cgit v1.3