Convert trivial TopDown mutators to BottomUp
Many TopDown mutators can be easily converted to BottomUp mutators, which are easier to handle for incremental and partial analysis. Bug: 367784740 Test: all soong tests pass Test: no change to build.ninja Flag: EXEMPT refactor Change-Id: I82955e844ed0eb6680854678c0744ac5398eb7ba
This commit is contained in:
@@ -283,7 +283,7 @@ func RegisterVisibilityRuleGatherer(ctx RegisterMutatorsContext) {
|
||||
|
||||
// This must be registered after the deps have been resolved.
|
||||
func RegisterVisibilityRuleEnforcer(ctx RegisterMutatorsContext) {
|
||||
ctx.TopDown("visibilityRuleEnforcer", visibilityRuleEnforcer).Parallel()
|
||||
ctx.BottomUp("visibilityRuleEnforcer", visibilityRuleEnforcer).Parallel()
|
||||
}
|
||||
|
||||
// Checks the per-module visibility rule lists before defaults expansion.
|
||||
@@ -507,7 +507,7 @@ func splitRule(ctx BaseModuleContext, ruleExpression string, currentPkg, propert
|
||||
return true, pkg, name
|
||||
}
|
||||
|
||||
func visibilityRuleEnforcer(ctx TopDownMutatorContext) {
|
||||
func visibilityRuleEnforcer(ctx BottomUpMutatorContext) {
|
||||
qualified := createVisibilityModuleReference(ctx.ModuleName(), ctx.ModuleDir(), ctx.Module())
|
||||
|
||||
// Visit all the dependencies making sure that this module has access to them all.
|
||||
|
Reference in New Issue
Block a user