You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix zero-initializer import replay when a cached initializer is reused from a reorganized submodule.
The initializer type import now participates in the deferred import set that is cached with the initializer. This prevents typedef names such as STAT_T from being emitted in a header module without the matching use.
From 1:1 discussion: I don't understand why this isn't a semantics-preserving change, given that beforehand we call import_type upfront (even on calls that will be cache hits), and afterward we defer imports and then do so (so that calling import_type does not directly modify the imports when called but rather adds these imports to the pending cache entry). It seems like both before and after this change, the imports added by import_type will be added on every call to zero_initializer and the only thing changing is whether they are read from the cache or not.
I'd like to see an explanation of what isn't true in the above understanding, or an example trace of how control/data flow works out for a particular case that makes it clear why this is a fix.
Does the attached test really fail without the accompanying change to zero_initializer?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Fix zero-initializer import replay when a cached initializer is reused from a reorganized submodule.
The initializer type import now participates in the deferred import set that is cached with the initializer. This prevents typedef names such as
STAT_Tfrom being emitted in a header module without the matchinguse.Surfaced when working on PR #1861.