llvm-project/clang/test/CodeGenObjC/arm64-int32-ivar.m
AZero13 6720465c47
[ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465)
Only NSObject we can trust the layout of won't change even though we
cannot directly see its @implementation
2025-03-04 08:34:18 -08:00

20 lines
426 B
Objective-C

// RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm -o - %s | FileCheck %s
// CHECK: @"OBJC_IVAR_$_I.IVAR2" = global i32 8
// CHECK: @"OBJC_IVAR_$_I.IVAR1" = global i32 0
@interface SuperClass
@end
@interface I : SuperClass
{
id IVAR1;
id IVAR2;
}
@end
@implementation I
// CHECK: [[IVAR:%.*]] = load i32, ptr @"OBJC_IVAR_$_I.IVAR2"
// CHECK: [[CONV:%.*]] = sext i32 [[IVAR]] to i64
- (id) METH { return IVAR2; }
@end