[llvm] r193189 - llvm-cov: fix a typo and rename a variable.
Bob Wilson
bob.wilson at apple.com
Tue Oct 22 12:54:32 PDT 2013
Author: bwilson
Date: Tue Oct 22 14:54:32 2013
New Revision: 193189
URL: http://llvm.org/viewvc/llvm-project?rev=193189&view=rev
Log:
llvm-cov: fix a typo and rename a variable.
Rename Size to EndPos, which makes more sense because the variable
stores the last location of the blocks.
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=193189&r1=193188&r2=193189&view=diff
==============================================================================
--- llvm/trunk/lib/IR/GCOV.cpp (original)
+++ llvm/trunk/lib/IR/GCOV.cpp Tue Oct 22 14:54:32 2013
@@ -85,7 +85,7 @@ GCOVFunction::~GCOVFunction() {
DeleteContainerPointers(Blocks);
}
-/// read - Read a aunction from the buffer. Return false if buffer cursor
+/// read - Read a function from the buffer. Return false if buffer cursor
/// does not point to a function tag.
bool GCOVFunction::read(GCOVBuffer &Buff, GCOV::GCOVFormat Format) {
if (!Buff.readFunctionTag())
@@ -136,14 +136,14 @@ bool GCOVFunction::read(GCOVBuffer &Buff
// read line table.
while (Buff.readLineTag()) {
uint32_t LineTableLength = Buff.readInt();
- uint32_t Size = Buff.getCursor() + LineTableLength*4;
+ uint32_t EndPos = Buff.getCursor() + LineTableLength*4;
uint32_t BlockNo = Buff.readInt();
assert(BlockNo < BlockCount && "Unexpected Block number!");
GCOVBlock *Block = Blocks[BlockNo];
Buff.readInt(); // flag
- while (Buff.getCursor() != (Size - 4)) {
+ while (Buff.getCursor() != (EndPos - 4)) {
StringRef Filename = Buff.readString();
- if (Buff.getCursor() == (Size - 4)) break;
+ if (Buff.getCursor() == (EndPos - 4)) break;
while (uint32_t L = Buff.readInt())
Block->addLine(Filename, L);
}
More information about the llvm-commits
mailing list