diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-16 03:07:40 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-16 03:07:40 +0000 |
commit | 2559011a0176f7829effdad0a26395f14d723930 (patch) | |
tree | 1de10f1246a795cab51406684f53b2e80acbafd9 /utils | |
parent | 0cc0929efcb5a137c351cd7e2fa70b0e2e97f313 (diff) | |
download | llvm-2559011a0176f7829effdad0a26395f14d723930.tar.gz llvm-2559011a0176f7829effdad0a26395f14d723930.tar.bz2 llvm-2559011a0176f7829effdad0a26395f14d723930.tar.xz |
Prempt some obnoxious compiler from complaing about signed/unsigned
compares.
2^30 is actually the limit on the number of physical registers per
TargetRegisterInfo.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/SetTheory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/SetTheory.cpp b/utils/TableGen/SetTheory.cpp index bee6763fb0..509d2f3417 100644 --- a/utils/TableGen/SetTheory.cpp +++ b/utils/TableGen/SetTheory.cpp @@ -155,14 +155,14 @@ struct SequenceOp : public SetTheory::Operator { From = II->getValue(); else throw "From must be an integer: " + Expr->getAsString(); - if (From < 0 || From >= UINT_MAX) + if (From < 0 || From >= (1 << 30)) throw "From out of range"; if (IntInit *II = dynamic_cast<IntInit*>(Expr->arg_begin()[2])) To = II->getValue(); else throw "From must be an integer: " + Expr->getAsString(); - if (To < 0 || To >= UINT_MAX) + if (To < 0 || To >= (1 << 30)) throw "To out of range"; RecordKeeper &Records = |