Merge "Add SingletonContext::VisitDirectDepths[If] to Android proxy."

am: 344eed4eb1

Change-Id: I78306020fbc7413e336e7bb7c21c5fe5aa4f2d09
This commit is contained in:
Mitch Phillips 2019-10-16 21:15:52 -07:00 committed by android-build-merger
commit 403f0998cd
1 changed files with 12 additions and 0 deletions

View File

@ -52,6 +52,10 @@ type SingletonContext interface {
VisitAllModulesBlueprint(visit func(blueprint.Module)) VisitAllModulesBlueprint(visit func(blueprint.Module))
VisitAllModules(visit func(Module)) VisitAllModules(visit func(Module))
VisitAllModulesIf(pred func(Module) bool, visit func(Module)) VisitAllModulesIf(pred func(Module) bool, visit func(Module))
VisitDirectDeps(module Module, visit func(Module))
VisitDirectDepsIf(module Module, pred func(Module) bool, visit func(Module))
// Deprecated: use WalkDeps instead to support multiple dependency tags on the same module // Deprecated: use WalkDeps instead to support multiple dependency tags on the same module
VisitDepsDepthFirst(module Module, visit func(Module)) VisitDepsDepthFirst(module Module, visit func(Module))
// Deprecated: use WalkDeps instead to support multiple dependency tags on the same module // Deprecated: use WalkDeps instead to support multiple dependency tags on the same module
@ -192,6 +196,14 @@ func (s *singletonContextAdaptor) VisitAllModulesIf(pred func(Module) bool, visi
s.SingletonContext.VisitAllModulesIf(predAdaptor(pred), visitAdaptor(visit)) s.SingletonContext.VisitAllModulesIf(predAdaptor(pred), visitAdaptor(visit))
} }
func (s *singletonContextAdaptor) VisitDirectDeps(module Module, visit func(Module)) {
s.SingletonContext.VisitDirectDeps(module, visitAdaptor(visit))
}
func (s *singletonContextAdaptor) VisitDirectDepsIf(module Module, pred func(Module) bool, visit func(Module)) {
s.SingletonContext.VisitDirectDepsIf(module, predAdaptor(pred), visitAdaptor(visit))
}
func (s *singletonContextAdaptor) VisitDepsDepthFirst(module Module, visit func(Module)) { func (s *singletonContextAdaptor) VisitDepsDepthFirst(module Module, visit func(Module)) {
s.SingletonContext.VisitDepsDepthFirst(module, visitAdaptor(visit)) s.SingletonContext.VisitDepsDepthFirst(module, visitAdaptor(visit))
} }