diff options
author | Bob Wilson <bob.wilson@apple.com> | 2013-10-22 20:02:36 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2013-10-22 20:02:36 +0000 |
commit | 868e6e339f9426a3762e639c9f30f038966d2de7 (patch) | |
tree | 1a269ca5c287129076979bbbc5a168dcf64536e3 /llvm/lib/IR/GCOV.cpp | |
parent | 13b4ef2dba31bbe1868fe964f0f0c9885e03750b (diff) | |
download | bcm5719-llvm-868e6e339f9426a3762e639c9f30f038966d2de7.tar.gz bcm5719-llvm-868e6e339f9426a3762e639c9f30f038966d2de7.zip |
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!
llvm-svn: 193192
Diffstat (limited to 'llvm/lib/IR/GCOV.cpp')
-rw-r--r-- | llvm/lib/IR/GCOV.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/GCOV.cpp b/llvm/lib/IR/GCOV.cpp index 84a7d63d612..e16c7e6c76a 100644 --- a/llvm/lib/IR/GCOV.cpp +++ b/llvm/lib/IR/GCOV.cpp @@ -117,7 +117,7 @@ bool GCOVFunction::read(GCOVBuffer &Buff, GCOV::GCOVFormat Format) { (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, GCOV::GCOVFormat Format) { 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 } |