Rollup merge of #107153 - tmiasko:dominates, r=oli-obk

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:
Yuki Okushi 2023-01-23 19:30:02 +09:00 committed by GitHub
commit eae7f947b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 18 deletions

View file

@ -285,7 +285,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)
}