[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / CodeGenObjC / protocol-comdat.m
blob79a1d5535576bee39ee44d6b17970a8fe6df7b1f
1 // RUN: %clang_cc1 -triple thumbv7--windows-itanium -fobjc-runtime=ios -emit-llvm -o - %s -Wno-objc-root-class | FileCheck %s
3 @protocol P
4 - (void) method;
5 @end
7 @protocol Q @end
8 @protocol R @end
10 @interface I<P>
11 @end
13 @implementation I
14 - (void) method { }
15 @end
17 _Bool f(void) {
18   return @protocol(Q) == @protocol(R);
21 // CHECK: $"_OBJC_PROTOCOL_$_P" = comdat any
22 // CHECK: $"_OBJC_LABEL_PROTOCOL_$_P" = comdat any
23 // CHECK: $"_OBJC_PROTOCOL_REFERENCE_$_Q" = comdat any
24 // CHECK: $"_OBJC_PROTOCOL_REFERENCE_$_R" = comdat any
26 // CHECK: @"_OBJC_PROTOCOL_$_P" = {{.*}}, comdat
27 // CHECK: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, comdat