diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-06-29 00:54:44 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-06-29 00:54:44 +0000 |
commit | 64b75be74b549be56038f8795788ebb73714709e (patch) | |
tree | 67d6c07156c3d8f0e4ed4276d2a6a6bacd09df84 /test/CodeGenObjC | |
parent | 145692ef46de14b98bb54ed3ed098b2b69dd2b9a (diff) |
CodeGen: handle missed case of COMDAT handling
When Protocol references are constructed, we need to add the reference
symbol to a COMDAT group on non-MachO object file formats (MachO handles
this by having a coalesced attribute). This adds the missing case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC')
-rw-r--r-- | test/CodeGenObjC/protocol-comdat.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenObjC/protocol-comdat.m b/test/CodeGenObjC/protocol-comdat.m index 65e1b9fa2c..a19ba8cf35 100644 --- a/test/CodeGenObjC/protocol-comdat.m +++ b/test/CodeGenObjC/protocol-comdat.m @@ -4,6 +4,9 @@ - (void) method; @end +@protocol Q; +@protocol R; + @interface I<P> @end @@ -11,9 +14,14 @@ - (void) method { } @end +_Bool f(void) { + return @protocol(Q) == @protocol(R); +} // CHECK: $"\01l_OBJC_PROTOCOL_$_P" = comdat any // CHECK: $"\01l_OBJC_LABEL_PROTOCOL_$_P" = comdat any +// CHECK: $"\01l_OBJC_PROTOCOL_REFERENCE_$_Q" = comdat any +// CHECK: $"\01l_OBJC_PROTOCOL_REFERENCE_$_R" = comdat any // CHECK: @"\01l_OBJC_PROTOCOL_$_P" = {{.*}}, comdat // CHECK: @"\01l_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, comdat |