diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2019-01-18 19:46:00 +0000 |
---|---|---|
committer | Jordan Rupprecht <rupprecht@google.com> | 2019-01-18 19:46:00 +0000 |
commit | 3748d41833787fcbf59cc5624e8d2b042a8991bc (patch) | |
tree | f3fcdba7decca7ee845a1bb3f885cb0baa1b4d83 /test/CodeGenObjC/gnustep2-category-protocol.m | |
parent | 55c8788102d8fd203270fabd6513247b2d7fbd87 (diff) | |
parent | e054eb577a1f469b1a4a49fce08572c76e2dddf2 (diff) |
Creating branches/google/stable and tags/google/stable/2019-01-18 from r351319
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/google/stable@351578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC/gnustep2-category-protocol.m')
-rw-r--r-- | test/CodeGenObjC/gnustep2-category-protocol.m | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGenObjC/gnustep2-category-protocol.m b/test/CodeGenObjC/gnustep2-category-protocol.m new file mode 100644 index 0000000000..6463474507 --- /dev/null +++ b/test/CodeGenObjC/gnustep2-category-protocol.m @@ -0,0 +1,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 + + |