1 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-freebsd -S -emit-llvm -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck %s
10 @property (readonly) int x;
17 - (int)x { return 12; }
18 + (int)clsMeth { return 42; }
19 - (id)meth { return ivar2; }
22 // Check that we get an ivar offset variable for the synthesised ivar.
23 // CHECK: @"__objc_ivar_offset_X.y.\01" = hidden global i32 16
25 // Check that we get a sensible metaclass method list.
26 // CHECK: internal global { i8*, i32, i64, [1 x { i8* (i8*, i8*, ...)*, i8*, i8* }] }
27 // CHECK-SAME: @_c_X__clsMeth
29 // Check that we get a metaclass and that it is not an exposed symbol:
30 // CHECK: @._OBJC_METACLASS_X = internal global
32 // Check that we get a reference to the superclass symbol:
33 // CHECK: @._OBJC_CLASS_Super = external global i8*
35 // Check that we get an ivar list with all three ivars, in the correct order
36 // CHECK: private global { i32, i64, [3 x { i8*, i8*, i32*, i32, i32 }] }
37 // CHECK-SAME: @__objc_ivar_offset_X.ivar1.i
38 // CHECK-SAME: @"__objc_ivar_offset_X.ivar2.\01"
39 // CHECK-SAME: @"__objc_ivar_offset_X.y.\01"
41 // Check that we get some plausible property metadata.
42 // CHECK: private unnamed_addr constant [5 x i8] c"Ti,R\00", align 1
43 // CHECK: private unnamed_addr constant [6 x i8] c"T@,Vy\00", align 1
44 // CHECK: = internal global { i32, i32, i8*, [2 x { i8*, i8*, i8*, i8*, i8* }] } { i32 2, i32 40, i8* null,
46 // Check that we get a class structure.
47 // CHECK: @._OBJC_CLASS_X = global { { i8*, i8*, i8*, i64, i64, i64, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i64, i8* }*, i8*, i8*, i64, i64, i64, { i32, i64, [3 x { i8*, i8*, i32*, i32, i32 }] }*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i64, { i32, i32, i8*, [2 x { i8*, i8*, i8*, i8*, i8* }] }* }
48 // CHECK-SAME: @._OBJC_METACLASS_X
49 // CHECK-SAME: @._OBJC_CLASS_Super
51 // And check that we get a pointer to it in the right place
52 // CHECK: @._OBJC_REF_CLASS_X = global
53 // CHECK-SAME: @._OBJC_CLASS_X
54 // CHECK-SAME: section "__objc_class_refs"