mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
add ConstantRange::difference (to perform set difference/relative complement)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159352 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -248,6 +248,12 @@ ConstantRange ConstantRange::subtract(const APInt &Val) const {
|
||||
return ConstantRange(Lower - Val, Upper - Val);
|
||||
}
|
||||
|
||||
/// \brief Subtract the specified range from this range (aka relative complement
|
||||
/// of the sets).
|
||||
ConstantRange ConstantRange::difference(const ConstantRange &CR) const {
|
||||
return intersectWith(CR.inverse());
|
||||
}
|
||||
|
||||
/// intersectWith - Return the range that results from the intersection of this
|
||||
/// range with another range. The resultant range is guaranteed to include all
|
||||
/// elements contained in both input ranges, and to have the smallest possible
|
||||
|
Reference in New Issue
Block a user