[llvm] r195153 - llvm-cov: Moved printing after error checks.
Yuchen Wu
yuchenericwu at hotmail.com
Tue Nov 19 12:57:20 PST 2013
Author: ywu
Date: Tue Nov 19 14:57:20 2013
New Revision: 195153
URL: http://llvm.org/viewvc/llvm-project?rev=195153&view=rev
Log:
llvm-cov: Moved printing after error checks.
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=195153&r1=195152&r2=195153&view=diff
==============================================================================
--- llvm/trunk/lib/IR/GCOV.cpp (original)
+++ llvm/trunk/lib/IR/GCOV.cpp Tue Nov 19 14:57:20 2013
@@ -281,18 +281,20 @@ void FileInfo::print(raw_fd_ostream &OS,
for (StringMap<LineCounts>::const_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";
- const LineCounts &L = I->second;
OwningPtr<MemoryBuffer> Buff;
if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, Buff)) {
errs() << Filename << ": " << ec.message() << "\n";
return;
}
StringRef AllLines = Buff->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";
+
+ const LineCounts &L = I->second;
uint32_t i = 0;
while (!AllLines.empty()) {
LineCounts::const_iterator CountIt = L.find(i);
More information about the llvm-commits
mailing list