mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
[ConstantRange] Add assertion for KnownBits validity; NFC
Following the suggestion in D59475. llvm-svn: 356346
This commit is contained in:
parent
d423c075d2
commit
1135cfa6a7
@ -56,6 +56,8 @@ ConstantRange::ConstantRange(APInt L, APInt U)
|
|||||||
|
|
||||||
ConstantRange ConstantRange::fromKnownBits(const KnownBits &Known,
|
ConstantRange ConstantRange::fromKnownBits(const KnownBits &Known,
|
||||||
bool IsSigned) {
|
bool IsSigned) {
|
||||||
|
assert(!Known.hasConflict() && "Expected valid KnownBits");
|
||||||
|
|
||||||
if (Known.isUnknown())
|
if (Known.isUnknown())
|
||||||
return ConstantRange(Known.getBitWidth(), /* full */ true);
|
return ConstantRange(Known.getBitWidth(), /* full */ true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user