summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_bvgraph.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sanitizer_common/sanitizer_bvgraph.h')
-rw-r--r--lib/sanitizer_common/sanitizer_bvgraph.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/sanitizer_common/sanitizer_bvgraph.h b/lib/sanitizer_common/sanitizer_bvgraph.h
index 9a547d3d4..df72f1c2d 100644
--- a/lib/sanitizer_common/sanitizer_bvgraph.h
+++ b/lib/sanitizer_common/sanitizer_bvgraph.h
@@ -61,18 +61,12 @@ class BVGraph {
}
// *EXPERIMENTAL*
- // Returns true if all edges from=>to exist.
+ // Returns true if an edge from=>to exist.
// This function does not use any global state except for 'this' itself,
// and thus can be called from different threads w/o locking.
// This would be racy.
// FIXME: investigate how much we can prove about this race being "benign".
- bool hasAllEdges(const BV &from, uptr to) {
- for (typename BV::Iterator it(from); it.hasNext(); ) {
- uptr idx = it.next();
- if (!v[idx].getBit(to)) return false;
- }
- return true;
- }
+ bool hasEdge(uptr from, uptr to) { return v[from].getBit(to); }
// Returns true if the edge from=>to was removed.
bool removeEdge(uptr from, uptr to) {