[llvm] r193192 - llvm-cov: Use uint32_t for loop variables to be more consistent.
Bob Wilson
bob.wilson at apple.com
Tue Oct 22 13:02:36 PDT 2013
Author: bwilson
Date: Tue Oct 22 15:02:36 2013
New Revision: 193192
URL: http://llvm.org/viewvc/llvm-project?rev=193192&view=rev
Log:
llvm-cov: Use uint32_t for loop variables to be more consistent.
The loop bounds here are uint32_t variables, so it makes sense for the
loop variables to have the same type.
Patch by Yuchen Wu!
Modified:
llvm/trunk/lib/IR/GCOV.cpp
Modified: llvm/trunk/lib/IR/GCOV.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/GCOV.cpp?rev=193192&r1=193191&r2=193192&view=diff
==============================================================================
--- llvm/trunk/lib/IR/GCOV.cpp (original)
+++ llvm/trunk/lib/IR/GCOV.cpp Tue Oct 22 15:02:36 2013
@@ -117,7 +117,7 @@ bool GCOVFunction::read(GCOVBuffer &Buff
(void)BlockTagFound;
assert(BlockTagFound && "Block Tag not found!");
uint32_t BlockCount = Buff.readInt();
- for (int i = 0, e = BlockCount; i != e; ++i) {
+ for (uint32_t i = 0, e = BlockCount; i != e; ++i) {
Buff.readInt(); // Block flags;
Blocks.push_back(new GCOVBlock(i));
}
@@ -127,7 +127,7 @@ bool GCOVFunction::read(GCOVBuffer &Buff
uint32_t EdgeCount = (Buff.readInt() - 1) / 2;
uint32_t BlockNo = Buff.readInt();
assert(BlockNo < BlockCount && "Unexpected Block number!");
- for (int i = 0, e = EdgeCount; i != e; ++i) {
+ for (uint32_t i = 0, e = EdgeCount; i != e; ++i) {
Blocks[BlockNo]->addEdge(Buff.readInt());
Buff.readInt(); // Edge flag
}
More information about the llvm-commits
mailing list