Home | History | Annotate | Download | only in CodeGenObjC
      1 // RUN: %clang_cc1 -emit-llvm -x objective-c %s -o - | FileCheck %s
      2 // rdar://16203115
      3 
      4 @interface NSObject @end
      5 
      6 @protocol P0;
      7 
      8 @interface A : NSObject <P0>
      9 +(Class) getClass;
     10 @end
     11 
     12 @implementation A
     13 +(Class) getClass { return self; }
     14 @end
     15 
     16 int main() {
     17   Protocol *P0 = @protocol(P0);
     18   return 0;
     19 }
     20 
     21 // CHECK: @"\01l_OBJC_PROTOCOL_$_P0" = weak hidden global
     22 // CHECK: @"\01l_OBJC_CLASS_PROTOCOLS_$_A" = private global
     23 // CHECK: @"\01l_OBJC_LABEL_PROTOCOL_$_P0" = weak hidden global
     24 // CHECK: @"\01l_OBJC_PROTOCOL_REFERENCE_$_P0" = weak hidden global
     25 
     26 // CHECK: llvm.compiler.used = appending global [10 x i8*] {{[^"]*}}OBJC_CLASS_NAME_{{[^"]*}}OBJC_METH_VAR_NAME_{{[^"]*}}OBJC_METH_VAR_TYPE_{{[^"]*}}"\01l_OBJC_$_CLASS_METHODS_A"{{[^"]*}}"\01l_OBJC_CLASS_PROTOCOLS_$_A"{{[^"]*}}OBJC_CLASS_NAME_.1{{[^"]*}}"\01l_OBJC_PROTOCOL_$_P0"{{[^"]*}}"\01l_OBJC_LABEL_PROTOCOL_$_P0"{{[^"]*}}"\01l_OBJC_PROTOCOL_REFERENCE_$_P0"{{[^"]*}}"OBJC_LABEL_CLASS_$"{{[^"]*}} section "llvm.metadata"
     27