[4.2][pmo] Eliminate incomplete support for promoting enums. #17598
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: This removes code from PMO that was never implemented correctly a long time ago (2013-2014). It was disguised by DI and PMO both relying on the same code and us getting lucky due to SILGen. Now that we are running PMO in the perf pipeline, we hit this problem.
Scope: This could cause us to miscompile.
SR Issue: rdar://41161408
Risk: Low. After this change, we just bail on the misbehaving cases, rather than try to process them so it should be safe.
Testing: Ran compiler tests and added the crasher example as a runtime test.
Reviewer: @atrick
This was never implemented correctly way back in 2013-2014. It was originally
added I believe so we could DI checks, but the promotion part was never added.
Given that DI is now completely split from PMO, we can just turn this off and if
necessary add it back on master "properly".
rdar://41161408
(cherry picked from commit b9f69cb)