[llvm] r298807 - Fix signed/unsigned comparison warnings.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 26 06:59:18 PDT 2017
Author: rksimon
Date: Sun Mar 26 08:59:17 2017
New Revision: 298807
URL: http://llvm.org/viewvc/llvm-project?rev=298807&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=298807&r1=298806&r2=298807&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Instructions.h (original)
+++ llvm/trunk/include/llvm/IR/Instructions.h Sun Mar 26 08:59:17 2017
@@ -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;
More information about the llvm-commits
mailing list