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 {
197197
198198 bool isSubsetOf (IndexSubset *other) const ;
199199 bool isSupersetOf (IndexSubset *other) const ;
200+ bool isDisjointWith (IndexSubset *other) const ;
200201
201202 IndexSubset *adding (unsigned index, ASTContext &ctx) const ;
202203 IndexSubset *extendingCapacity (ASTContext &ctx,
Original file line number Diff line number Diff line change @@ -52,6 +52,14 @@ bool IndexSubset::isSupersetOf(IndexSubset *other) const {
5252 return true ;
5353}
5454
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+
5563IndexSubset *IndexSubset::adding (unsigned index, ASTContext &ctx) const {
5664 assert (index < getCapacity ());
5765 if (contains (index))
You can’t perform that action at this time.
0 commit comments