[llvm] r298813 - Fix signed/unsigned comparison warnings.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 26 10:39:41 PDT 2017


Author: rksimon
Date: Sun Mar 26 12:39:41 2017
New Revision: 298813

URL: http://llvm.org/viewvc/llvm-project?rev=298813&view=rev
Log:
Fix signed/unsigned comparison warnings.

Modified:
    llvm/trunk/include/llvm/IR/Instructions.h

Modified: llvm/trunk/include/llvm/IR/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Instructions.h?rev=298813&r1=298812&r2=298813&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Instructions.h (original)
+++ llvm/trunk/include/llvm/IR/Instructions.h Sun Mar 26 12:39:41 2017
@@ -3150,7 +3150,7 @@ public:
       assert(((unsigned)Index == DefaultPseudoIndex ||
               (unsigned)Index < SI->getNumCases()) &&
              "Index out the number of cases.");
-      return Index != DefaultPseudoIndex ? Index + 1 : 0;
+      return (unsigned)Index != DefaultPseudoIndex ? Index + 1 : 0;
     }
 
     Self &operator+=(ptrdiff_t N) {




More information about the llvm-commits mailing list