summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2013-10-22 05:09:41 +0000
committerBob Wilson <bob.wilson@apple.com>2013-10-22 05:09:41 +0000
commite877eebfe9d716ed1101aecf958af473836e70e1 (patch)
treedf2f081e28c655b896b933c73425b52e797c26e5 /include
parent78fe4d62fb12fd3d77cac4d26ec1ab2010aace12 (diff)
downloadllvm-e877eebfe9d716ed1101aecf958af473836e70e1.tar.gz
llvm-e877eebfe9d716ed1101aecf958af473836e70e1.tar.bz2
llvm-e877eebfe9d716ed1101aecf958af473836e70e1.tar.xz
Change llvm-cov output formatting to be more similar to gcov.
- Replaced tabs with proper padding - print() takes two arguments, which are the GCNO and GCDA filenames - Files are listed at the top of output, appended by line 0 - Stripped strings of trailing \0s - Removed last two lines of whitespace in output Patch by Yuchen Wu! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/GCOV.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Support/GCOV.h b/include/llvm/Support/GCOV.h
index f1040f545c..67d637021a 100644
--- a/include/llvm/Support/GCOV.h
+++ b/include/llvm/Support/GCOV.h
@@ -145,7 +145,7 @@ public:
uint32_t Len = readInt() * 4;
StringRef Str = Buffer->getBuffer().slice(Cursor, Cursor+Len);
Cursor += Len;
- return Str;
+ return Str.split('\0').first;
}
uint64_t getCursor() const { return Cursor; }
@@ -216,7 +216,7 @@ typedef SmallVector<uint32_t, 16> LineCounts;
class FileInfo {
public:
void addLineCount(StringRef Filename, uint32_t Line, uint32_t Count);
- void print();
+ void print(StringRef gcnoFile, StringRef gcdaFile);
private:
StringMap<LineCounts> LineInfo;
};