summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/GCOV.cpp
diff options
context:
space:
mode:
authorYuchen Wu <yuchenericwu@hotmail.com>2013-11-05 01:20:41 +0000
committerYuchen Wu <yuchenericwu@hotmail.com>2013-11-05 01:20:41 +0000
commit446e991f440089fd5a644c706aaf8a4a374a02c3 (patch)
tree2cffe60111e224d377d5a4fac4c932bd1d8fdd01 /llvm/lib/IR/GCOV.cpp
parent30672d90861ba7b94fdab3ba171b836552d4ed43 (diff)
downloadbcm5719-llvm-446e991f440089fd5a644c706aaf8a4a374a02c3.tar.gz
bcm5719-llvm-446e991f440089fd5a644c706aaf8a4a374a02c3.zip
llvm-cov: Added command-line option to change dir.
This will allow for much easier testing when the input files are in a different folder from the test script. llvm-svn: 194034
Diffstat (limited to 'llvm/lib/IR/GCOV.cpp')
-rw-r--r--llvm/lib/IR/GCOV.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/IR/GCOV.cpp b/llvm/lib/IR/GCOV.cpp
index a33da2a5525..9f4b5367e19 100644
--- a/llvm/lib/IR/GCOV.cpp
+++ b/llvm/lib/IR/GCOV.cpp
@@ -266,18 +266,20 @@ void FileInfo::print(raw_fd_ostream &OS, StringRef gcnoFile,
for (StringMap<LineCounts>::iterator I = LineInfo.begin(), E = LineInfo.end();
I != E; ++I) {
StringRef Filename = I->first();
- OS << " -: 0:Source:" << Filename << "\n";
- OS << " -: 0:Graph:" << gcnoFile << "\n";
- OS << " -: 0:Data:" << gcdaFile << "\n";
- OS << " -: 0:Runs:" << RunCount << "\n";
- OS << " -: 0:Programs:" << ProgramCount << "\n";
- LineCounts &L = LineInfo[Filename];
OwningPtr<MemoryBuffer> Buff;
if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, Buff)) {
errs() << Filename << ": " << ec.message() << "\n";
return;
}
StringRef AllLines = Buff.take()->getBuffer();
+
+ OS << " -: 0:Source:" << Filename << "\n";
+ OS << " -: 0:Graph:" << gcnoFile << "\n";
+ OS << " -: 0:Data:" << gcdaFile << "\n";
+ OS << " -: 0:Runs:" << RunCount << "\n";
+ OS << " -: 0:Programs:" << ProgramCount << "\n";
+
+ LineCounts &L = LineInfo[Filename];
uint32_t i = 0;
while (!AllLines.empty()) {
if (L.find(i) != L.end()) {
OpenPOWER on IntegriCloud