From: Simon Pilgrim Date: Sun, 26 Mar 2017 13:59:17 +0000 (+0000) Subject: Fix signed/unsigned comparison warnings. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00c788d0683be7f89290f7e359700a05174af5fa;p=llvm Fix signed/unsigned comparison warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298807 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/Instructions.h b/include/llvm/IR/Instructions.h index b8606a08eca..ded2b6b3fc8 100644 --- a/include/llvm/IR/Instructions.h +++ b/include/llvm/IR/Instructions.h @@ -3137,7 +3137,7 @@ public: /// Resolves successor for current case. BasicBlockTy *getCaseSuccessor() { assert(((unsigned)Index < SI->getNumCases() || - Index == DefaultPseudoIndex) && + (unsigned)Index == DefaultPseudoIndex) && "Index out the number of cases."); return SI->getSuccessor(getSuccessorIndex()); } @@ -3147,7 +3147,7 @@ public: /// Returns TerminatorInst's successor index for current case successor. unsigned getSuccessorIndex() const { - assert((Index == DefaultPseudoIndex || + assert(((unsigned)Index == DefaultPseudoIndex || (unsigned)Index < SI->getNumCases()) && "Index out the number of cases."); return Index != DefaultPseudoIndex ? Index + 1 : 0;