[llvm-commits] [llvm] r133142 - /llvm/trunk/utils/TableGen/SetTheory.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jun 15 20:07:41 PDT 2011


Author: stoklund
Date: Wed Jun 15 22:07:40 2011
New Revision: 133142

URL: http://llvm.org/viewvc/llvm-project?rev=133142&view=rev
Log:
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.

Modified:
    llvm/trunk/utils/TableGen/SetTheory.cpp

Modified: llvm/trunk/utils/TableGen/SetTheory.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SetTheory.cpp?rev=133142&r1=133141&r2=133142&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SetTheory.cpp (original)
+++ llvm/trunk/utils/TableGen/SetTheory.cpp Wed Jun 15 22:07:40 2011
@@ -155,14 +155,14 @@
       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 =





More information about the llvm-commits mailing list