diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-12 20:14:20 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-12 20:14:20 +0000 |
| commit | 2461509cc13ce3895a4575af2711ded0e7d134d2 (patch) | |
| tree | 4e56bba2554d7f4b08da523fa6bc9142bf75f3a1 /clang/test/CodeGenObjC | |
| parent | 0e8364e91254c5cb410a47472557981cb56d961f (diff) | |
| download | bcm5719-llvm-2461509cc13ce3895a4575af2711ded0e7d134d2.tar.gz bcm5719-llvm-2461509cc13ce3895a4575af2711ded0e7d134d2.zip | |
Allow protocols to be just declared.
llvm-svn: 217704
Diffstat (limited to 'clang/test/CodeGenObjC')
| -rw-r--r-- | clang/test/CodeGenObjC/undefined-protocol2.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/undefined-protocol2.m b/clang/test/CodeGenObjC/undefined-protocol2.m new file mode 100644 index 00000000000..f171523b042 --- /dev/null +++ b/clang/test/CodeGenObjC/undefined-protocol2.m @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -triple x86_64-apple-macosx -emit-llvm %s -o - | FileCheck %s + +// Test that we produce a declaration for the protocol. It must be matched +// by a definition in another TU, so external is the correct linkage +// (not extern_weak). +// CHECK: @"\01l_OBJC_PROTOCOL_$_p1" = external global + +@interface NSObject +@end + +@protocol p1; + +@interface I1 : NSObject <p1> +@end + +@implementation I1 +@end |

