1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -fblocks -emit-llvm -o - %s | FileCheck %s
8 @interface Base : NSObject @end
10 // @implementation Base
16 @interface Derived : Base
22 @implementation Derived
31 // CHECK: define internal i8* @"\01-[Derived init]"
32 // CHECK: [[IVAR:%.*]] = load i64, i64* @"OBJC_IVAR_$_Derived.member", align 8, !invariant.load
34 void * variant_load_1(int i) {
37 Derived *d = [Derived new];
43 // CHECK-LABEL: define{{.*}} i8* @variant_load_1(i32 noundef %i)
44 // CHECK: [[IVAR:%.*]] = load i64, i64* @"OBJC_IVAR_$_Derived.member", align 8{{$}}
46 @interface Container : Derived @end
47 @implementation Container
48 - (void *) invariant_load_1
54 // CHECK-LABEL: define internal i8* @"\01-[Container invariant_load_1]"
55 // CHECK: [[IVAR:%.*]] = load i64, i64* @"OBJC_IVAR_$_Derived.member", align 8, !invariant.load
64 // CHECK-LABEL: define internal i8* @block_block_invoke
65 // CHECK: load i64, i64* @"OBJC_IVAR_$_ForBlock.foo"
66 id (^block)(ForBlock*) = ^(ForBlock* a) {