2019-09-27 13:37:06 +08:00
|
|
|
// RUN: %clang_cc1 -triple thumbv7--windows-itanium -fobjc-runtime=ios -emit-llvm -o - %s -Wno-objc-root-class | FileCheck %s
|
2016-10-25 22:50:44 +08:00
|
|
|
|
|
|
|
@protocol P
|
|
|
|
- (void) method;
|
|
|
|
@end
|
|
|
|
|
2018-08-18 06:18:08 +08:00
|
|
|
@protocol Q @end
|
|
|
|
@protocol R @end
|
2017-06-29 08:54:44 +08:00
|
|
|
|
2016-10-25 22:50:44 +08:00
|
|
|
@interface I<P>
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I
|
|
|
|
- (void) method { }
|
|
|
|
@end
|
|
|
|
|
2017-06-29 08:54:44 +08:00
|
|
|
_Bool f(void) {
|
|
|
|
return @protocol(Q) == @protocol(R);
|
|
|
|
}
|
2016-10-25 22:50:44 +08:00
|
|
|
|
2019-03-14 23:17:37 +08:00
|
|
|
// CHECK: $"_OBJC_PROTOCOL_$_P" = comdat any
|
|
|
|
// CHECK: $"_OBJC_LABEL_PROTOCOL_$_P" = comdat any
|
2019-05-10 01:43:52 +08:00
|
|
|
// CHECK: $"_OBJC_PROTOCOL_REFERENCE_$_Q" = comdat any
|
|
|
|
// CHECK: $"_OBJC_PROTOCOL_REFERENCE_$_R" = comdat any
|
2016-10-25 22:50:44 +08:00
|
|
|
|
2019-03-14 23:17:37 +08:00
|
|
|
// CHECK: @"_OBJC_PROTOCOL_$_P" = {{.*}}, comdat
|
|
|
|
// CHECK: @"_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, comdat
|
2016-10-25 22:50:44 +08:00
|
|
|
|