summaryrefslogtreecommitdiff
path: root/lib/IR/GCOV.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2013-10-22 19:54:32 +0000
committerBob Wilson <bob.wilson@apple.com>2013-10-22 19:54:32 +0000
commit0a2463c990db33dd5fc1a15b70bcc38d4c273af7 (patch)
tree4251da5e151fe723fde0c4982b136ef56518c1b6 /lib/IR/GCOV.cpp
parent01b0e94bb731310e72f66977e4b57cd3f3280ba4 (diff)
downloadllvm-0a2463c990db33dd5fc1a15b70bcc38d4c273af7.tar.gz
llvm-0a2463c990db33dd5fc1a15b70bcc38d4c273af7.tar.bz2
llvm-0a2463c990db33dd5fc1a15b70bcc38d4c273af7.tar.xz
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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193189 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/GCOV.cpp')
-rw-r--r--lib/IR/GCOV.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/IR/GCOV.cpp b/lib/IR/GCOV.cpp
index 8a3fb47bf1..84a7d63d61 100644
--- a/lib/IR/GCOV.cpp
+++ b/lib/IR/GCOV.cpp
@@ -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, GCOV::GCOVFormat Format) {
// 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);
}