Fix predicated visitors.
This change makes the Context.visitDepsDepthFirstIf() method descend into modules for which the predicate is false rather than skipping their entire sub-DAG. Change-Id: I50564c69a714d5e199e1a51a8aa24162b0dc6f11
This commit is contained in:
parent
b2e7b5d036
commit
0bb5d8a8d9
1 changed files with 5 additions and 5 deletions
|
@ -1068,12 +1068,12 @@ func (c *Context) visitDepsDepthFirstIf(module Module, pred func(Module) bool,
|
|||
walk = func(m Module) {
|
||||
info := c.moduleInfo[m]
|
||||
visited[m] = true
|
||||
if pred(m) {
|
||||
for _, dep := range info.directDeps {
|
||||
if !visited[dep] {
|
||||
walk(dep)
|
||||
}
|
||||
for _, dep := range info.directDeps {
|
||||
if !visited[dep] {
|
||||
walk(dep)
|
||||
}
|
||||
}
|
||||
if pred(m) {
|
||||
visit(m)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue