File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ class IndexSubset : public llvm::FoldingSetNode {
197
197
198
198
bool isSubsetOf (IndexSubset *other) const ;
199
199
bool isSupersetOf (IndexSubset *other) const ;
200
+ bool isDisjointWith (IndexSubset *other) const ;
200
201
201
202
IndexSubset *adding (unsigned index, ASTContext &ctx) const ;
202
203
IndexSubset *extendingCapacity (ASTContext &ctx,
Original file line number Diff line number Diff line change @@ -52,6 +52,14 @@ bool IndexSubset::isSupersetOf(IndexSubset *other) const {
52
52
return true ;
53
53
}
54
54
55
+ bool IndexSubset::isDisjointWith (IndexSubset *other) const {
56
+ assert (capacity == other->capacity );
57
+ for (auto index : range (numBitWords))
58
+ if (getBitWord (index) & other->getBitWord (index))
59
+ return false ;
60
+ return true ;
61
+ }
62
+
55
63
IndexSubset *IndexSubset::adding (unsigned index, ASTContext &ctx) const {
56
64
assert (index < getCapacity ());
57
65
if (contains (index))
You can’t perform that action at this time.
0 commit comments