[llvm] r257483 - Fix compiler warnings from r257477

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 08:51:55 PST 2016


Author: kparzysz
Date: Tue Jan 12 10:51:55 2016
New Revision: 257483

URL: http://llvm.org/viewvc/llvm-project?rev=257483&view=rev
Log:
Fix compiler warnings from r257477

Modified:
    llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp

Modified: llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp?rev=257483&r1=257482&r2=257483&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp Tue Jan 12 10:51:55 2016
@@ -315,7 +315,7 @@ void NodeAllocator::startNewBlock() {
   // Check if the block index is still within the allowed range, i.e. less
   // than 2^N, where N is the number of bits in NodeId for the block index.
   // BitsPerIndex is the number of bits per node index.
-  assert((Blocks.size() < (1 << (8*sizeof(NodeId)-BitsPerIndex))) &&
+  assert((Blocks.size() < (1U << (8*sizeof(NodeId)-BitsPerIndex))) &&
          "Out of bits for block index");
   ActiveEnd = P;
 }
@@ -789,7 +789,7 @@ unsigned DataFlowGraph::DefStack::nextUp
   // The input position P does not have to point to a non-delimiter.
   unsigned SS = Stack.size();
   bool IsDelim;
-  assert(P >= 0 && P < SS);
+  assert(P < SS);
   do {
     P++;
     IsDelim = isDelimiter(Stack[P-1]);




More information about the llvm-commits mailing list