Consistently use dominates instead of is_dominated_by
There is a number of APIs that answer dominance queries. Previously they were named either "dominates" or "is_dominated_by". Consistently use the "dominates" form. No functional changes.
This commit is contained in:
parent
b22aa57fd5
commit
955e7fbb16
5 changed files with 18 additions and 18 deletions
|
@ -289,7 +289,7 @@ impl<Node: Idx> Dominators<Node> {
|
|||
Iter { dominators: self, node: Some(node) }
|
||||
}
|
||||
|
||||
pub fn is_dominated_by(&self, node: Node, dom: Node) -> bool {
|
||||
pub fn dominates(&self, dom: Node, node: Node) -> bool {
|
||||
// FIXME -- could be optimized by using post-order-rank
|
||||
self.dominators(node).any(|n| n == dom)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue