[Incremental compilation]: Merge pull request #32219 from davidungar/quick-dependency-bug-fix #32230
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.
Fixes a regression from 5.2. Undo a dependency optimization that causes miscompiles.
Explanation: In order to realize a benefit from type-body-fingerprints, code was added to omit a dependency wherein a file A depended upon a type defined in that same file A. However, if that same type is also used subsequently to its definition in the same file A, the omission causes miscompiles because a use of that type in file B depends upon file A. The omission causes file A to be insensitive to changes in the type, and thus causes the use in file B to be insensitive to changes in the type. In the future, refinements in the dependency system may well allow us to reenable this optimization, but for now, we need to disable the optimization in order to prevent miscompilations.
Origination: d09c906 Fed 27, 11:38 pm
Risk: Zero, because all it does is add dependencies. It effectively puts us back to pre-type-body-fingerprints.
Reviewed by: Slava Pestov
Testing: CI PR tests + the perturbation tester
Radar:rdar://64074744