1// RUN: %clang_cc1 -triple x86_64-unknown-freebsd -S -emit-llvm -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck %s 2 3// Regression test. We weren't emitting definitions for protocols used in 4// categories, causing linker errors when the category was the only reference 5// to a protocol in a binary. 6 7// CHECK: @._OBJC_PROTOCOL_Y = global 8// CHECK-SAME: section "__objc_protocols", comdat, align 8 9 10 11@interface X 12{ 13id isa; 14} 15@end 16@implementation X 17@end 18 19@protocol Y @end 20 21@interface X (y) <Y> 22@end 23@implementation X (y) @end 24 25 26