xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/undefined-protocol2.m (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-macosx -emit-llvm %s -o - | FileCheck %s
2*0a6a1f1dSLionel Sambuc
3*0a6a1f1dSLionel Sambuc// Test that we produce a declaration for the protocol. It must be matched
4*0a6a1f1dSLionel Sambuc// by a definition in another TU, so external is the correct linkage
5*0a6a1f1dSLionel Sambuc// (not extern_weak).
6*0a6a1f1dSLionel Sambuc// CHECK: @"\01l_OBJC_PROTOCOL_$_p1" = external global
7*0a6a1f1dSLionel Sambuc
8*0a6a1f1dSLionel Sambuc@interface NSObject
9*0a6a1f1dSLionel Sambuc@end
10*0a6a1f1dSLionel Sambuc
11*0a6a1f1dSLionel Sambuc@protocol p1;
12*0a6a1f1dSLionel Sambuc
13*0a6a1f1dSLionel Sambuc@interface I1 : NSObject <p1>
14*0a6a1f1dSLionel Sambuc@end
15*0a6a1f1dSLionel Sambuc
16*0a6a1f1dSLionel Sambuc@implementation I1
17*0a6a1f1dSLionel Sambuc@end
18