aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/gnu-empty-protocol-v3.m
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:06:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:06:01 +0000
commit486754660bb926339aefcf012a3f848592babb8b (patch)
treeecdbc446c9876f4f120f701c243373cd3cb43db3 /test/CodeGenObjC/gnu-empty-protocol-v3.m
parent55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff)
Notes
Diffstat (limited to 'test/CodeGenObjC/gnu-empty-protocol-v3.m')
-rw-r--r--test/CodeGenObjC/gnu-empty-protocol-v3.m26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGenObjC/gnu-empty-protocol-v3.m b/test/CodeGenObjC/gnu-empty-protocol-v3.m
new file mode 100644
index 000000000000..151427bf062e
--- /dev/null
+++ b/test/CodeGenObjC/gnu-empty-protocol-v3.m
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fobjc-runtime=gnustep-1.9 -emit-llvm -o - %s | FileCheck %s
+
+@protocol X;
+
+__attribute__((objc_root_class))
+@interface Z <X>
+@end
+
+@implementation Z
+@end
+
+
+// CHECK: @.objc_protocol_list = internal global { i8*, i32, [0 x i8*] } zeroinitializer, align 4
+// CHECK: @.objc_method_list = internal global { i32, [0 x { i8*, i8* }] } zeroinitializer, align 4
+// CHECK: @.objc_protocol_name = private unnamed_addr constant [2 x i8] c"X\00", align 1
+// CHECK: @._OBJC_PROTOCOL_X = internal global { i8*, i8*, { i8*, i32, [0 x i8*] }*, i8*, i8*, i8*, i8*, i8*, i8* } {
+// CHECK-SAME: i8* inttoptr (i32 3 to i8*),
+// CHECK-SAME: i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.objc_protocol_name, i32 0, i32 0),
+// CHECK-SAME: { i8*, i32, [0 x i8*] }* @.objc_protocol_list
+// CHECK-SAME: { i32, [0 x { i8*, i8* }] }* @.objc_method_list
+// CHECK-SAME: { i32, [0 x { i8*, i8* }] }* @.objc_method_list
+// CHECK-SAME: { i32, [0 x { i8*, i8* }] }* @.objc_method_list
+// CHECK-SAME: { i32, [0 x { i8*, i8* }] }* @.objc_method_list
+// CHECK-SAME: i8* null
+// CHECK-SAME: i8* null
+// CHECK-SAME: }, align 4