[5.0] [ABI] [Mangling] Disambiguate protocol-conformance-ref better #21478
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation: The mangling for references to *non-*retroactive conformances in bound generic types was suffix-ambiguous with the one for retroactive conformances; fix that by adding explicit operators to distinguish the non-retroactive cases. Additionally, reduce the set of situations such conformances references need to be mangled at all.
Scope: Affects the mangling of bound generic types where a generic parameter has a conformance constraint.
Issue: rdar://problem/46735592
Risk: Medium, because it is changing mangling. Most of the symbols that would change are currently broken, but not all uses of those symbols require them to demangle successfully. (However, in those cases it shouldn't matter what the symbol is.)
Testing: Added compiler regression tests. [Will verify tomorrow that the original failing project now builds successfully.]
Reviewed by: @rjmccall, @DougGregor