aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/gnustep2-category-protocol.m
blob: 6463474507634b5bfb25ad4bc77bf5f0340d796c (plain)
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
// RUN: %clang_cc1 -triple x86_64-unknown-freebsd -S -emit-llvm -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck %s

// Regression test.  We weren't emitting definitions for protocols used in
// categories, causing linker errors when the category was the only reference
// to a protocol in a binary.

// CHECK: @._OBJC_PROTOCOL_Y = global 
// CHEKC-SAME: section "__objc_protocols", comdat, align 8


@interface X
{
id isa;
}
@end
@implementation X
@end

@protocol Y @end

@interface X (y) <Y>
@end
@implementation X (y) @end