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