reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
// RUN: %clang_cc1 -S -emit-llvm -fobjc-runtime=gcc -o - %s | FileCheck %s

@protocol NSCopying
@end

@interface NSObject {
  struct objc_object *isa;
}
+ (id) new;
- (id) init;
@end

@interface NSString : NSObject <NSCopying>
+ (NSString *)foo;
@end

@interface TestClass : NSObject {
@public
  NSString    *_stringIvar;
  int         _intIvar;
}
@end
@implementation TestClass

@end

int main() {
  TestClass *c = [TestClass new];
  return 0;
}

// CHECK: = private unnamed_addr constant [12 x i8] c"_stringIvar\00"
// CHECK: = private unnamed_addr constant [12 x i8] c"@\22NSString\22\00"
// CHECK: = private unnamed_addr constant [9 x i8] c"_intIvar\00"
// CHECK: = private unnamed_addr constant [2 x i8] c"i\00"

@interface Class1 {
  int : 3;
  short : 2;
  long long ll;
  char : 1;
}
@end

@implementation Class1
@end

// CHECK: @{{.*}} = private unnamed_addr constant [5 x i8] c"b0i3\00"
// CHECK: @{{.*}} = private unnamed_addr constant [5 x i8] c"b3s2\00"
// CHECK: @{{.*}} = private unnamed_addr constant [2 x i8] c"q\00"
// CHECK: @{{.*}} = private unnamed_addr constant [{{7|6}} x i8] c"b{{128|96}}c1\00"